From 78f8312eceb9fa68abcca350b2ef33d4b5c8dc09 Mon Sep 17 00:00:00 2001 From: Yihau Chen Date: Sat, 5 Oct 2024 01:10:53 +0800 Subject: [PATCH] ci: run Github Actions only in anza-xyz/agave (#3070) --- .github/workflows/add-team-to-ghsa.yml | 1 + .github/workflows/benchmark.yml | 1 + .github/workflows/cargo.yml | 1 + .github/workflows/client-targets.yml | 2 ++ .github/workflows/crate-check.yml | 1 + .github/workflows/docs.yml | 1 + .github/workflows/downstream-project-spl-nightly.yml | 8 +------- .github/workflows/downstream-project-spl.yml | 1 + .github/workflows/release.yml | 3 +++ 9 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/add-team-to-ghsa.yml b/.github/workflows/add-team-to-ghsa.yml index ea70d5870bf582..5e5f2f70881050 100644 --- a/.github/workflows/add-team-to-ghsa.yml +++ b/.github/workflows/add-team-to-ghsa.yml @@ -7,6 +7,7 @@ on: jobs: add-team-to-ghsa: + if: github.repository == 'anza-xyz/agave' runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index bdfc21e2b0ec4c..d78f22288bd632 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -6,6 +6,7 @@ on: jobs: benchmark: + if: github.repository == 'anza-xyz/agave' name: benchmark runs-on: benchmark strategy: diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 01db66c1a1bd4a..b78d9d66de4016 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -27,6 +27,7 @@ env: jobs: clippy-nightly: + if: github.repository == 'anza-xyz/agave' strategy: matrix: os: diff --git a/.github/workflows/client-targets.yml b/.github/workflows/client-targets.yml index 1a33d2ae59493c..fb0b4ebcb8447c 100644 --- a/.github/workflows/client-targets.yml +++ b/.github/workflows/client-targets.yml @@ -20,6 +20,7 @@ env: jobs: android: + if: github.repository == 'anza-xyz/agave' strategy: matrix: os: @@ -44,6 +45,7 @@ jobs: run: ./cargo stable ndk --target ${{ matrix.target }} build -p solana-client ios: + if: github.repository == 'anza-xyz/agave' strategy: matrix: os: diff --git a/.github/workflows/crate-check.yml b/.github/workflows/crate-check.yml index 6f130853ac1425..4526a0f526a891 100644 --- a/.github/workflows/crate-check.yml +++ b/.github/workflows/crate-check.yml @@ -14,6 +14,7 @@ on: jobs: check: + if: github.repository == 'anza-xyz/agave' runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c348d69acbe4ea..2118a713cf5eb1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,6 +14,7 @@ on: jobs: check: + if: github.repository == 'anza-xyz/agave' outputs: continue: ${{ steps.check.outputs.need_to_build }} runs-on: ubuntu-20.04 diff --git a/.github/workflows/downstream-project-spl-nightly.yml b/.github/workflows/downstream-project-spl-nightly.yml index e408140b52b927..ca0bcabd75a20a 100644 --- a/.github/workflows/downstream-project-spl-nightly.yml +++ b/.github/workflows/downstream-project-spl-nightly.yml @@ -6,13 +6,7 @@ on: jobs: main: - # As this is a cron job, it is better to avoid running it for all the forks. - # They are unlike to benefit from these executions, and they could easily - # eat up all the minutes GitHub allocation to free accounts. - if: > - github.event_name != 'schedule' - || github.repository == 'solana-labs/solana' - + if: github.repository == 'anza-xyz/agave' strategy: fail-fast: false matrix: diff --git a/.github/workflows/downstream-project-spl.yml b/.github/workflows/downstream-project-spl.yml index a3f45a29b30b0d..8097999ee8e8e9 100644 --- a/.github/workflows/downstream-project-spl.yml +++ b/.github/workflows/downstream-project-spl.yml @@ -37,6 +37,7 @@ env: jobs: check: + if: github.repository == 'anza-xyz/agave' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 73b8b0d25399d6..9d2f180d06b497 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: jobs: trigger-buildkite-pipeline: + if: github.repository == 'anza-xyz/agave' runs-on: ubuntu-latest steps: - name: Trigger a Buildkite Build @@ -20,6 +21,7 @@ jobs: message: ":github: Triggered from a GitHub Action" draft-release: + if: github.repository == 'anza-xyz/agave' runs-on: ubuntu-latest steps: - name: Create Release @@ -38,6 +40,7 @@ jobs: }) version-bump: + if: github.repository == 'anza-xyz/agave' runs-on: ubuntu-latest steps: - name: Checkout code