Skip to content

Commit

Permalink
Actually trigger the workflow for PRs
Browse files Browse the repository at this point in the history
The workflows did not always trigger for PRs versus normal pushes.
  • Loading branch information
Michael Vasseur committed Jun 2, 2024
1 parent 02e8da0 commit bff923b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build-contributor-container-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ on:

jobs:
pr-contributor:
if: ${{ !(github.repository == 'domjudge/domjudge-packaging' &&
github.ref == 'refs/heads/main') &&
!contains(github.ref, 'gh-readonly-queue') &&
(github.event_name == 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository) }}
# Stop processing if this is a merge-queue
# Stop processing if this is not against our repo
# Always run if this PR is not from our organization
# Or run if this PR is not `main` (So notQueue && ourRepo && (notPROurOrg || notMain))
if : ${{ !contains(github.ref, 'gh-readonly-queue') &&
github.repository == 'domjudge/domjudge-packaging' &&
!(github.event.pull_request.head.repo.full_name == 'domjudge/domjudge-packaging' && github.ref == 'main') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/build-domjudge-container-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ env:

jobs:
pr-domjudge:
if: ${{ !(github.repository == 'domjudge/domjudge-packaging' &&
github.ref == 'refs/heads/main') &&
!contains(github.ref, 'gh-readonly-queue') &&
(github.event_name == 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository) }}
# Stop processing if this is a merge-queue
# Stop processing if this is not against our repo
# Always run if this PR is not from our organization
# Or run if this PR is not `main` (So notQueue && ourRepo && (notPROurOrg || notMain))
if : ${{ !contains(github.ref, 'gh-readonly-queue') &&
github.repository == 'domjudge/domjudge-packaging' &&
!(github.event.pull_request.head.repo.full_name == 'domjudge/domjudge-packaging' && github.ref == 'main') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/build-gitlab-container-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ on:

jobs:
pr-gitlab:
if: ${{ !(github.repository == 'domjudge/domjudge-packaging' &&
github.ref == 'refs/heads/main') &&
!contains(github.ref, 'gh-readonly-queue') &&
(github.event_name == 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository) }}
# Stop processing if this is a merge-queue
# Stop processing if this is not against our repo
# Always run if this PR is not from our organization
# Or run if this PR is not `main` (So notQueue && ourRepo && (notPROurOrg || notMain))
if : ${{ !contains(github.ref, 'gh-readonly-queue') &&
github.repository == 'domjudge/domjudge-packaging' &&
!(github.event.pull_request.head.repo.full_name == 'domjudge/domjudge-packaging' && github.ref == 'main') }}
name: PR GitLab image
runs-on: ubuntu-latest
permissions:
Expand Down

0 comments on commit bff923b

Please sign in to comment.