Skip to content

Commit

Permalink
feat: Add OCI image annotations
Browse files Browse the repository at this point in the history
These annotations are useful for tools (such as Renovate and Snyk) to use as well as for manual use by individuals.

See: https://github.com/opencontainers/image-spec/blob/v1.1.0/annotations.md#pre-defined-annotation-keys
  • Loading branch information
candrews committed May 20, 2024
1 parent 8bfe255 commit e32aae2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion script/release-workflow/docker-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ set -euo >/dev/null
push() {
## These will use cached builds, so wont build every time.
docker buildx build --platform=linux/amd64,linux/arm64,linux/arm \
--annotation "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
--annotation "org.opencontainers.image.revision=$GITHUB_SHA" \
--output=type=image,push=true \
-t ${DOCKER_IMAGE_ORG_AND_NAME}:$1 .
}
Expand All @@ -27,4 +29,4 @@ push_ghcr ${TAG}
if [ "${PUSH_TO_LATEST}" != "false" ]; then
push latest
push_ghcr latest
fi
fi

0 comments on commit e32aae2

Please sign in to comment.