Skip to content

Commit

Permalink
Run certain GitHub Actions workflows on official repo only
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
weiji14 committed Jan 3, 2024
1 parent fbfed86 commit 9c94176
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ concurrency:
jobs:
benchmarks:
runs-on: ubuntu-22.04
if: github.repository == 'GenericMappingTools/pygmt'
defaults:
run:
shell: bash -l {0}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
check_links:
name: Check Links
runs-on: ubuntu-latest
if: github.repository == 'GenericMappingTools/pygmt'

steps:
- name: Checkout the repository
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
docs:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: github.repository == 'GenericMappingTools/pygmt'
strategy:
fail-fast: false
matrix:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_doctests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
test:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: github.repository == 'GenericMappingTools/pygmt'
strategy:
fail-fast: false
matrix:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_tests_legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
test:
name: ${{ matrix.os }} - GMT ${{ matrix.gmt_version }}
runs-on: ${{ matrix.os }}
if: github.repository == 'GenericMappingTools/pygmt'
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
jobs:
update_release_draft:
runs-on: ubuntu-latest
if: github.repository == 'GenericMappingTools/pygmt'

steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/[email protected]
Expand Down

0 comments on commit 9c94176

Please sign in to comment.