From 37fd08e637300f3fba792401b1d8b105a7a7c6f5 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 17 Nov 2019 21:18:25 -0600 Subject: [PATCH] workflows: Don't try to upload when running in someone's fork .. which we can tell by whether the environment variable is non-empty --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10c34355d1..404cd19a67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }}