Skip to content

Commit

Permalink
fix merge step
Browse files Browse the repository at this point in the history
  • Loading branch information
Jguer committed Sep 14, 2024
1 parent ac15514 commit 9b0dfe3
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/builder-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,33 @@ jobs:
type=raw,value=latest
type=sha,format=long
- name: Create and push manifest list
env:
DOCKER_CLI_EXPERIMENTAL: enabled
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "${{ steps.meta.outputs.json }}") \
$(for file in /tmp/digests/*; do echo -n "${{ env.REGISTRY_IMAGE }}@$(cat $file) "; done)
- name: Create and push manifest list
env:
DOCKER_CLI_EXPERIMENTAL: enabled
run: |
# Extract tags using jq and ensure proper formatting
TAGS=$(jq -cr '.tags[] | "-t " + .' <<< "${{ steps.meta.outputs.json }}")
# Check if TAGS is empty
if [ -z "$TAGS" ]; then
echo "No tags found in JSON output."
exit 1
fi
# Create a manifest list using the image digests from /tmp/digests/*
DIGESTS=$(for file in /tmp/digests/*; do
echo -n "${{ env.REGISTRY_IMAGE }}@$(cat $file) "
done)
# Verify DIGESTS is not empty
if [ -z "$DIGESTS" ]; then
echo "No digests found."
exit 1
fi
# Create the manifest list with the collected tags and digests
docker buildx imagetools create $TAGS $DIGESTS
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

0 comments on commit 9b0dfe3

Please sign in to comment.