summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-07-06 10:45:27 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2022-07-06 10:45:27 -0400
commite72af290f6f3ec3f99b11999e6918a1ad3471f0c (patch)
tree0d1041d8cc624288c40a1cf5796997663f39e20f /.github
parent3847522e86e9c65be674f1372cefefdbfbe9ba2b (diff)
downloadlibgit2-e72af290f6f3ec3f99b11999e6918a1ad3471f0c.tar.gz
actions: limit secheduled workflows to our main repo
Only run scheduled workflows on the main repository; prevents people from using build minutes on their forks.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/benchmark.yml4
-rw-r--r--.github/workflows/codeql.yml6
-rw-r--r--.github/workflows/nightly.yml8
3 files changed, 17 insertions, 1 deletions
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 7ae14ca7e..285c273b1 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -11,6 +11,10 @@ jobs:
# targets and their details. Then we build either in a docker container
# (Linux) or on the actual hosts (macOS, Windows).
build:
+ # Only run scheduled workflows on the main repository; prevents people
+ # from using build minutes on their forks.
+ if: github.repository == 'libgit2/libgit2'
+
strategy:
matrix:
platform:
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index de1ec5e33..9b4615c21 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -10,6 +10,10 @@ env:
jobs:
analyze:
+ # Only run scheduled workflows on the main repository; prevents people
+ # from using build minutes on their forks.
+ if: github.repository == 'libgit2/libgit2'
+
name: Analyze
runs-on: ubuntu-latest
@@ -30,7 +34,7 @@ jobs:
mkdir build
cd build
cmake .. -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON
- cmake --build .
+ cmake --build .
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 5f80ed010..73013821c 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -15,6 +15,10 @@ jobs:
# targets and their details. Then we build either in a docker container
# (Linux) or on the actual hosts (macOS, Windows).
build:
+ # Only run scheduled workflows on the main repository; prevents people
+ # from using build minutes on their forks.
+ if: github.repository == 'libgit2/libgit2'
+
strategy:
matrix:
platform:
@@ -321,6 +325,10 @@ jobs:
shell: bash
coverity:
+ # Only run scheduled workflows on the main repository; prevents people
+ # from using build minutes on their forks.
+ if: github.repository == 'libgit2/libgit2'
+
name: Coverity
runs-on: ubuntu-latest
steps: