Skip to content

Commit dfdeb2f

Browse files
committed
The retry action lacks the output needed for the digests. Use metadata-file and read it in the next step
Signed-off-by: Adam Warner <[email protected]>
1 parent b349b00 commit dfdeb2f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/ftl-build-publish.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ jobs:
4040
runner: ubuntu-24.04-arm
4141
steps:
4242
- name: Prepare name for digest up/download
43+
shell: bash
4344
run: |
44-
platform=${{ matrix.platform }}
45-
echo "PLATFORM_PAIR=${platform//\/,-}" >> $GITHUB_ENV
45+
platform='${{ matrix.platform }}'
46+
echo "PLATFORM_PAIR=${platform//\//-}" >> "$GITHUB_ENV"
4647
4748
- &checkout-repo
4849
name: Checkout Repo
@@ -101,13 +102,20 @@ jobs:
101102
--platform ${{ matrix.platform }} \
102103
--target build \
103104
--label "${{ steps.meta.outputs.labels }}" \
105+
--metadata-file "/tmp/build-metadata-${{ env.PLATFORM_PAIR }}.json" \
104106
--output "type=image,name=${{ env.DOCKER_REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true" \
105107
ftl-build
106108
107109
- name: Export digests
108110
run: |
109111
mkdir -p /tmp/digests/
110-
digest="${{ steps.build.outputs.digest }}"
112+
digest="$(jq -r '\"containerimage.digest\"' "/tmp/build-metadata-${{ env.PLATFORM_PAIR }}.json")"
113+
114+
if [[ -z "${digest}" || "${digest}" == "null" ]]; then
115+
echo "Digest not found in buildx metadata file" >&2
116+
cat "/tmp/build-metadata-${{ env.PLATFORM_PAIR }}.json" >&2 || true
117+
exit 1
118+
fi
111119
touch "/tmp/digests/${digest#sha256:}"
112120
113121
- name: Upload digest

0 commit comments

Comments
 (0)