From 6fb4716e482aae874d00be962ce5ba2f920487fc Mon Sep 17 00:00:00 2001 From: Illia Bobyr Date: Tue, 14 Feb 2023 00:31:44 -0800 Subject: [PATCH] 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. --- .github/workflows/docs.yml | 4 +++- .github/workflows/release-artifacts-auto.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8ebae289fa..0e510f276d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 diff --git a/.github/workflows/release-artifacts-auto.yml b/.github/workflows/release-artifacts-auto.yml index e39dfdca7b..a8309cdffc 100644 --- a/.github/workflows/release-artifacts-auto.yml +++ b/.github/workflows/release-artifacts-auto.yml @@ -14,6 +14,7 @@ concurrency: jobs: release-artifacts: + if: github.repository == 'solana-labs/solana' uses: ./.github/workflows/release-artifacts.yml with: commit: ${{ github.sha }}