Skip to content

Commit

Permalink
Merge pull request #536 from LedgerHQ/INFRAPRJ-7379_1
Browse files Browse the repository at this point in the history
[ci][fix] INFRAPRJ-7379: Use proper push switcher in context of 'image' output
  • Loading branch information
vbaskov-ledger authored Dec 6, 2024
2 parents 7c39576 + 282945e commit d65cd29
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/speculos-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ jobs:
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
if [[ "${{ github.event_name }}" == 'push' && "${{ github.ref }}" == 'refs/heads/master' ]]; then
PUSH_FLAG='true'
else
PUSH_FLAG='false'
fi
echo "PUSH_FLAG=${PUSH_FLAG}" >> $GITHUB_ENV
- name: Clone
uses: actions/checkout@v4

Expand All @@ -57,10 +64,9 @@ jobs:
uses: docker/build-push-action@v6
id: build
with:
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
file: build.Dockerfile
platforms: ${{ matrix.platform }}
outputs: type=image,name=ghcr.io/ledgerhq/speculos-builder,push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/ledgerhq/speculos-builder,push-by-digest=true,name-canonical=true,push=${{ env.PUSH_FLAG }}

- name: Export digest
run: |
Expand Down

0 comments on commit d65cd29

Please sign in to comment.