Skip to content

Commit

Permalink
build: include annotations in the multi-arch images
Browse files Browse the repository at this point in the history
This needs --annotations support in buildx which was introduced in
docker/buildx#2020 and will be released in
0.12.0.
  • Loading branch information
nijel committed Nov 17, 2023
1 parent 884a52a commit b302bb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/bin/get-buildx-args
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ else
done
fi

# Expose annotations
WEBLATE_VERSION=$(sed -n 's/^ENV WEBLATE_VERSION \(.*\)/\1/p' Dockerfile)
sed -n "s/^LABEL \(org.opencontainers.image.*\)/--annotation \1/p" Dockerfile | sed "s/\\\$WEBLATE_VERSION/$WEBLATE_VERSION/"

# Write to local cache unless publishing (not compatible with push)
if [ "$1" != "publish" ] ; then
echo --cache-to "type=local,dest=/tmp/.buildx-cache/$MATRIX_ARCHITECTURE,mode=max"
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ LABEL org.opencontainers.image.url="https://weblate.org/"
LABEL org.opencontainers.image.documentation="https://docs.weblate.org/en/latest/admin/install/docker.html"
LABEL org.opencontainers.image.source="https://github.com/WeblateOrg/docker"
LABEL org.opencontainers.image.version=$WEBLATE_VERSION
LABEL org.opencontainers.image.vendor="Michal Čihař"
LABEL org.opencontainers.image.author="Michal Čihař <[email protected]>"
LABEL org.opencontainers.image.vendor="Weblate"
LABEL org.opencontainers.image.title="Weblate"
LABEL org.opencontainers.image.description="A web-based continuous localization system with tight version control integration"
LABEL org.opencontainers.image.licenses="GPL-3.0-or-later"
Expand Down

0 comments on commit b302bb3

Please sign in to comment.