Skip to content

Commit

Permalink
Restrict Python CI to the main repository only
Browse files Browse the repository at this point in the history
  • Loading branch information
metopa authored Mar 22, 2020
1 parent 4b3087e commit 16e3528
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
name: Fast Test
runs-on: ubuntu-latest
# Skip on PR if branch is of the same repo (checks are already enabled by push rule)
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
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)

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

strategy:
max-parallel: 2
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
name: Empty check
runs-on: ubuntu-latest
# Add a dummy job to avoid empty job list (otherwise GitHub shows the runs as failed)
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
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
steps:
- name: This check is triggered by the corresponding push event
run: echo 'This check is triggered by the corresponding push event'
Expand Down

0 comments on commit 16e3528

Please sign in to comment.