diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f118c2b..c4184a8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -136,6 +136,7 @@ jobs: is-release: ${{ steps.determination.outputs.is-release }} is-nightly: ${{ steps.determination.outputs.is-nightly }} channel-name: ${{ steps.determination.outputs.channel-name }} + publish-to-s3: ${{ steps.determination.outputs.publish-to-s3 }} permissions: {} steps: - name: Determine the type of build @@ -166,6 +167,8 @@ jobs: echo "is-release=$is_release" >> $GITHUB_OUTPUT echo "is-nightly=$is_nightly" >> $GITHUB_OUTPUT echo "channel-name=$channel_name" >> $GITHUB_OUTPUT + # Only attempt upload to Amazon S3 if the credentials are available. + echo "publish-to-s3=${{ github.repository == 'arduino/arduino-ide' }}" >> $GITHUB_OUTPUT select-targets: needs: build-type-determination @@ -509,7 +512,7 @@ jobs: - merge-channel-files-complete - changelog if: > - github.repository == 'arduino/arduino-ide' && + needs.build-type-determination.outputs.publish-to-s3 == 'true' && needs.build-type-determination.outputs.is-nightly == 'true' runs-on: ubuntu-latest steps: @@ -566,7 +569,7 @@ jobs: rm "${{ env.JOB_TRANSFER_ARTIFACT }}/stable-linux.yml" - name: Publish Release [S3] - if: github.repository == 'arduino/arduino-ide' + if: needs.build-type-determination.outputs.publish-to-s3 == 'true' uses: docker://plugins/s3 env: PLUGIN_SOURCE: '${{ env.JOB_TRANSFER_ARTIFACT }}/*'