Skip to content

Commit d0a7b14

Browse files
authored
Restrict Java CI to the main repository only
1 parent 5845160 commit d0a7b14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/test_java_make.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
strategy:
3131
matrix:
@@ -60,7 +60,7 @@ jobs:
6060
name: Full Test
6161
needs: fast_test
6262
runs-on: windows-latest
63-
if: github.event_name == 'push' && github.event.ref == 'refs/tags/full-ci' && github.event.deleted == false
63+
if: github.repository == 'adnanaziz/EPIJudge' && (github.event_name == 'push' && github.event.ref == 'refs/tags/full-ci' && github.event.deleted == false)
6464

6565
strategy:
6666
matrix:
@@ -95,7 +95,7 @@ jobs:
9595
name: Empty check
9696
runs-on: ubuntu-latest
9797
# Add a dummy job to avoid empty job list (otherwise GitHub shows the runs as failed)
98-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
98+
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
9999
steps:
100100
- name: This check is triggered by the corresponding push event
101101
run: echo 'This check is triggered by the corresponding push event'

0 commit comments

Comments
 (0)