Skip to content

Commit 3f4d274

Browse files
committed
Use a generalized criterion for S3 publishing determination in build workflow
The "Arduino IDE" GitHub Actions workflow uploads the nightly and release builds to Amazon S3, from which they are downloaded by the auto-update as well as directly by users via the links on the "Software" page of arduino.cc. The workflow can also be useful in forks. Either by those who want to test contributions staged in their fork prior to submitting a PR to the parent repo, or by those maintaining a hard fork of the project. Even though these forks wouldn't (and couldn't due to lack of access to the encrypted credential secrets only available to the workflow when ran in a trusted context in Arduino's repo)credentials stored in Arduino's repo) use the S3 upload component of the workflow, they may still find it valuable for continuous integration as well as continuous deployment via the tester builds and release builds the workflow also publishes to the GitHub repository it runs in. For this reason, the workflow contains code to determine whether it should attempt the S3 uploads. Previously the repository name was used as the criteria in that code. The project specificity of that approach makes the workflow less easily reusable. A more generally applicable criterion is whether the encrypted credential certificate is defined. The new criterion allows the workflow to be used in any repository where the administrator has created an encrypted secret containing their AWS credentials. That might be other projects owned by Arduino, or even 3rd party projects where the owners want to take a similar build publishing approach using their own AWS account.
1 parent 1365454 commit 3f4d274

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: .github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ jobs:
168168
echo "is-nightly=$is_nightly" >> $GITHUB_OUTPUT
169169
echo "channel-name=$channel_name" >> $GITHUB_OUTPUT
170170
# Only attempt upload to Amazon S3 if the credentials are available.
171-
echo "publish-to-s3=${{ github.repository == 'arduino/arduino-ide' }}" >> $GITHUB_OUTPUT
171+
echo "publish-to-s3=${{ secrets.AWS_SECRET_ACCESS_KEY != '' }}" >> $GITHUB_OUTPUT
172172
173173
select-targets:
174174
needs: build-type-determination

0 commit comments

Comments
 (0)