workflows: Don't try to upload when running in someone's fork

.. which we can tell by whether the environment variable is non-empty
This commit is contained in:
Jeff Epler 2019-11-17 21:18:25 -06:00
parent 8778f367e8
commit 37fd08e637
1 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ jobs:
name: ${{ matrix.board }}
path: bin/${{ matrix.board }}
- name: Upload to S3
run: aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@ -199,7 +199,7 @@ jobs:
run: |
pip install uritemplate
- name: Upload to Release
run: python3 -u upload_release_files.py
run: "[ -z \"$ADABOT_GITHUB_ACCESS_TOKEN\" ] || python3 -u upload_release_files.py"
working-directory: tools
env:
UPLOAD_URL: ${{ github.event.release.upload_url }}