Skip to content

Commit e329553

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 e329553

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

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

Lines changed: 7 additions & 5 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,14 +102,15 @@ 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
110+
shell: bash
108111
run: |
109-
mkdir -p /tmp/digests/
110-
digest="${{ steps.build.outputs.digest }}"
111-
touch "/tmp/digests/${digest#sha256:}"
112+
mkdir -p /tmp/digests
113+
touch "/tmp/digests/$(jq -er '."containerimage.digest" | sub("^sha256:"; "")' "/tmp/build-metadata-${{ env.PLATFORM_PAIR }}.json")"
112114
113115
- name: Upload digest
114116
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0

0 commit comments

Comments
 (0)