Skip to content

Commit

Permalink
fix: Use digest to tag Docker image as 'latest' to prevent missing im…
Browse files Browse the repository at this point in the history
…age error
  • Loading branch information
k0gen committed Oct 29, 2024
1 parent d05fc9f commit 85be11c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/sdk-utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: build_and_push
uses: docker/build-push-action@v6
with:
context: utils
Expand All @@ -64,7 +65,7 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache,new=true

- name: Tag as latest if requested
if: ${{ inputs.publish_as_latest == 'true' }}
if: ${{ inputs.publish_as_latest }}
run: |
docker tag ghcr.io/start9labs/sdk/utils:${{ github.sha }} ghcr.io/start9labs/sdk/utils:latest
docker push ghcr.io/start9labs/sdk/utils:latest
docker manifest create ghcr.io/start9labs/sdk/utils:latest --amend ghcr.io/start9labs/sdk/utils@${{ steps.build_and_push.outputs.digest }}
docker manifest push ghcr.io/start9labs/sdk/utils:latest

0 comments on commit 85be11c

Please sign in to comment.