From 282945e117d5ed19415a8980f7083d96223e4afa Mon Sep 17 00:00:00 2001 From: vbaskov-ledger Date: Thu, 5 Dec 2024 20:42:44 +0200 Subject: [PATCH] [ci][fix] INFRAPRJ-7379: Use proper push switcher in context of 'image' output --- .github/workflows/speculos-builder.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/speculos-builder.yml b/.github/workflows/speculos-builder.yml index dd7f20b0..fbe35d7a 100644 --- a/.github/workflows/speculos-builder.yml +++ b/.github/workflows/speculos-builder.yml @@ -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 @@ -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: |