Skip to content

Commit 58d6a0a

Browse files
Michael Vasseurvmcj
authored andcommitted
Actually trigger the workflow for PRs
The workflows did not always trigger for PRs versus normal pushes.
1 parent a2a06fb commit 58d6a0a

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

.github/workflows/build-contributor-container-PR.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ on:
1010

1111
jobs:
1212
pr-contributor:
13-
if: ${{ !(github.repository == 'domjudge/domjudge-packaging' &&
14-
github.ref == 'refs/heads/main') &&
15-
!contains(github.ref, 'gh-readonly-queue') &&
16-
(github.event_name == 'pull_request' ||
17-
github.event.pull_request.head.repo.full_name != github.repository) }}
13+
# Stop processing if this is a merge-queue
14+
# Stop processing if this is not against our repo
15+
# Always run if this PR is not from our organization
16+
# Or run if this PR is not `main` (So notQueue && ourRepo && (notPROurOrg || notMain))
17+
if : ${{ !contains(github.ref, 'gh-readonly-queue') &&
18+
github.repository == 'domjudge/domjudge-packaging' &&
19+
!(github.event.pull_request.head.repo.full_name == 'domjudge/domjudge-packaging' && github.ref == 'main') }}
1820
runs-on: ubuntu-latest
1921
steps:
2022
- name: Checkout

.github/workflows/build-domjudge-container-PR.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ env:
1111

1212
jobs:
1313
pr-domjudge:
14-
if: ${{ !(github.repository == 'domjudge/domjudge-packaging' &&
15-
github.ref == 'refs/heads/main') &&
16-
!contains(github.ref, 'gh-readonly-queue') &&
17-
(github.event_name == 'pull_request' ||
18-
github.event.pull_request.head.repo.full_name != github.repository) }}
14+
# Stop processing if this is a merge-queue
15+
# Stop processing if this is not against our repo
16+
# Always run if this PR is not from our organization
17+
# Or run if this PR is not `main` (So notQueue && ourRepo && (notPROurOrg || notMain))
18+
if : ${{ !contains(github.ref, 'gh-readonly-queue') &&
19+
github.repository == 'domjudge/domjudge-packaging' &&
20+
!(github.event.pull_request.head.repo.full_name == 'domjudge/domjudge-packaging' && github.ref == 'main') }}
1921
runs-on: ubuntu-latest
2022
steps:
2123
- name: Checkout

.github/workflows/build-gitlab-container-PR.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ on:
88

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

0 commit comments

Comments
 (0)