Skip to content

Commit

Permalink
Do not run upload actions if env var is not set
Browse files Browse the repository at this point in the history
ABLY_AWS_ACCOUNT_ID_SDK is an org level secret that will not be available to anybody outside of the Ably org, like dependabot. To prevent failures from PRs opened by dependabot et al, do run the upload steps.
  • Loading branch information
dpiatek committed Nov 22, 2023
1 parent af77b3c commit 5668c99
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,20 @@ jobs:
run: npm run docs
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
env:
ably_aws_account_id_sdk: ${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}
# do not run if these variables are not available; they will not be available for anybody outside the Ably org
if: ${{ env.ably_aws_account_id_sdk != '' }}
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/ably-sdk-builds-spaces
role-session-name: "${{ github.run_id }}-${{ github.run_number }}"
- name: Upload Documentation
uses: ably/sdk-upload-action@v1
env:
ably_aws_account_id_sdk: ${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}
# do not run if these variables are not available; they will not be available for anybody outside the Ably org
if: ${{ env.ably_aws_account_id_sdk != '' }}
with:
sourcePath: docs/typedoc/generated
githubToken: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 5668c99

Please sign in to comment.