Skip to content

Commit e0593d2

Browse files
authored
CI: Run certain GitHub Actions workflows on official repo only (#2951)
Run certain GitHub Actions workflows on official repo only Don't run specific GitHub Actions workflows from forks. Specifically: benchmarks.yml, check-links.yml, ci_docs.yml, ci_doctests.yaml, ci_tests_legacy.yaml, and release_drafter.yml.
1 parent 03f66b5 commit e0593d2

File tree

6 files changed

+7
-0
lines changed

6 files changed

+7
-0
lines changed

.github/workflows/benchmarks.yml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ concurrency:
3232
jobs:
3333
benchmarks:
3434
runs-on: ubuntu-22.04
35+
if: github.repository == 'GenericMappingTools/pygmt'
3536
defaults:
3637
run:
3738
shell: bash -l {0}

.github/workflows/check-links.yml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
check_links:
1919
name: Check Links
2020
runs-on: ubuntu-latest
21+
if: github.repository == 'GenericMappingTools/pygmt'
2122

2223
steps:
2324
- name: Checkout the repository

.github/workflows/ci_docs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
docs:
3838
name: ${{ matrix.os }}
3939
runs-on: ${{ matrix.os }}
40+
if: github.repository == 'GenericMappingTools/pygmt'
4041
strategy:
4142
fail-fast: false
4243
matrix:

.github/workflows/ci_doctests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
test:
2222
name: ${{ matrix.os }}
2323
runs-on: ${{ matrix.os }}
24+
if: github.repository == 'GenericMappingTools/pygmt'
2425
strategy:
2526
fail-fast: false
2627
matrix:

.github/workflows/ci_tests_legacy.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
test:
3333
name: ${{ matrix.os }} - GMT ${{ matrix.gmt_version }}
3434
runs-on: ${{ matrix.os }}
35+
if: github.repository == 'GenericMappingTools/pygmt'
3536
strategy:
3637
fail-fast: false
3738
matrix:

.github/workflows/release-drafter.yml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on:
1515
jobs:
1616
update_release_draft:
1717
runs-on: ubuntu-latest
18+
if: github.repository == 'GenericMappingTools/pygmt'
19+
1820
steps:
1921
# Drafts your next Release notes as Pull Requests are merged into "main"
2022
- uses: release-drafter/[email protected]

0 commit comments

Comments
 (0)