Skip to content

Commit 16e3528

Browse files
authored
Restrict Python CI to the main repository only
1 parent 4b3087e commit 16e3528

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/test_python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
name: Fast Test
2626
runs-on: ubuntu-latest
2727
# Skip on PR if branch is of the same repo (checks are already enabled by push rule)
28-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
28+
if: github.repository == 'adnanaziz/EPIJudge' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
2929

3030
steps:
3131
- uses: actions/checkout@v1
@@ -48,7 +48,7 @@ jobs:
4848
name: Full Test
4949
needs: fast_test
5050
runs-on: ${{ matrix.os }}
51-
if: github.event_name == 'push' && github.event.ref == 'refs/tags/full-ci' && github.event.deleted == false
51+
if: github.repository == 'adnanaziz/EPIJudge' && (github.event_name == 'push' && github.event.ref == 'refs/tags/full-ci' && github.event.deleted == false)
5252

5353
strategy:
5454
max-parallel: 2
@@ -80,7 +80,7 @@ jobs:
8080
name: Empty check
8181
runs-on: ubuntu-latest
8282
# Add a dummy job to avoid empty job list (otherwise GitHub shows the runs as failed)
83-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
83+
if: github.repository != 'adnanaziz/EPIJudge' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
8484
steps:
8585
- name: This check is triggered by the corresponding push event
8686
run: echo 'This check is triggered by the corresponding push event'

0 commit comments

Comments
 (0)