Skip to content

Commit

Permalink
use buildx imagetools create to tag/push image
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai committed Nov 7, 2024
1 parent 204c432 commit 8d08378
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-and-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ jobs:

- name: Apply tags to existing image
run: |
set -x
for registry in $REGISTRIES; do
for tag in $DOCKER_METADATA_OUTPUT_TAGS; do
docker tag "$IMAGE_ID" "$registry/$tag"
docker push "$registry/$tag"
done
opts="$(echo "$DOCKER_METADATA_OUTPUT_TAGS" | sed "s@^@--tag $registry/@g" | xargs echo)"
if [[ -n "$opts" ]]; then
docker buildx imagetools create $opts "$IMAGE_ID"
fi
done

0 comments on commit 8d08378

Please sign in to comment.