Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci][fix] INFRAPRJ-7379: Use proper push switcher in context of 'image' output #536

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading