Browse Source

ci: run Github Actions only in anza-xyz/agave (#3070)

Yihau Chen 1 year ago
parent
commit
78f8312ece

+ 1 - 0
.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

+ 1 - 0
.github/workflows/benchmark.yml

@@ -6,6 +6,7 @@ on:
 
 jobs:
   benchmark:
+    if: github.repository == 'anza-xyz/agave'
     name: benchmark
     runs-on: benchmark
     strategy:

+ 1 - 0
.github/workflows/cargo.yml

@@ -27,6 +27,7 @@ env:
 
 jobs:
   clippy-nightly:
+    if: github.repository == 'anza-xyz/agave'
     strategy:
       matrix:
         os:

+ 2 - 0
.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:

+ 1 - 0
.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

+ 1 - 0
.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

+ 1 - 7
.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:

+ 1 - 0
.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

+ 3 - 0
.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