ci: Do not produce build artifacts when run in a fork (#30294)

If someone forks the `solana` repo, they should not have access to Slack
or AWS storage locations that hold build artifacts.  Meaning, actions
that interact with that infrastructure will always fail.  It makes sense
to disable these actions in forks.
This commit is contained in:
Illia Bobyr 2023-02-14 00:31:44 -08:00 committed by GitHub
parent c617c345d9
commit 6fb4716e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -68,7 +68,9 @@ jobs:
build_and_deploy:
needs:
- check
if: ${{ needs.check.outputs.continue == 1 }}
if: >
github.repository == 'solana-labs/solana' &&
needs.check.outputs.continue == 1
# the name is used by .mergify.yml as well
name: build & deploy docs
runs-on: ubuntu-20.04

View File

@ -14,6 +14,7 @@ concurrency:
jobs:
release-artifacts:
if: github.repository == 'solana-labs/solana'
uses: ./.github/workflows/release-artifacts.yml
with:
commit: ${{ github.sha }}