added annotations to container image builds

This commit is contained in:
pushrbx 2024-01-19 22:20:00 +00:00 committed by GitHub
parent bb71a7a9eb
commit a39d74ca15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
@ -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