Skip to content

Commit 37fd08e

Browse files
committed
workflows: Don't try to upload when running in someone's fork
.. which we can tell by whether the environment variable is non-empty
1 parent 8778f36 commit 37fd08e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ jobs:
190190
name: ${{ matrix.board }}
191191
path: bin/${{ matrix.board }}
192192
- name: Upload to S3
193-
run: aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1
193+
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
194194
env:
195195
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
196196
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -199,7 +199,7 @@ jobs:
199199
run: |
200200
pip install uritemplate
201201
- name: Upload to Release
202-
run: python3 -u upload_release_files.py
202+
run: "[ -z \"$ADABOT_GITHUB_ACCESS_TOKEN\" ] || python3 -u upload_release_files.py"
203203
working-directory: tools
204204
env:
205205
UPLOAD_URL: ${{ github.event.release.upload_url }}

0 commit comments

Comments
 (0)