Skip to content

Commit

Permalink
Merge pull request #475 from jikan-me/gh_action_enhancement1
Browse files Browse the repository at this point in the history
💚 Added annotations to container image builds
  • Loading branch information
pushrbx authored Jan 20, 2024
2 parents 5eaf3bf + a39d74c commit ca0eba6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/container-image-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ jobs:
org.opencontainers.image.source=https://github.com/jikan-me/jikan-rest
org.opencontainers.image.documentation=https://github.com/jikan-me/jikan-rest/blob/master/container_usage.md
org.opencontainers.image.revision=${{ github.sha }}
annotations: |
org.opencontainers.image.title=Jikan REST API
org.opencontainers.image.description=REST API for Jikan
org.opencontainers.image.url=https://jikan.moe
org.opencontainers.image.source=https://github.com/jikan-me/jikan-rest
org.opencontainers.image.documentation=https://github.com/jikan-me/jikan-rest/blob/master/container_usage.md
org.opencontainers.image.revision=${{ github.sha }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -69,10 +76,8 @@ jobs:
# let's use github action cache storage
cache-from: type=gha,scope=buildkit_${{ matrix.platform }}
cache-to: type=gha,mode=max,scope=buildkit_${{ matrix.platform }}
# todo: We are building a multi arch image, and because of the OCI standard the labels defined above should go in the annotations too.
# todo: Add "annotations" when the new version hits of this action: https://github.com/docker/build-push-action/pull/992
# todo: that way all the fields in packages will be populated, so each version will have proper revision, name, description.
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
Expand Down

0 comments on commit ca0eba6

Please sign in to comment.