Skip to content

Commit 7a8b587

Browse files
committed
.github/workflows: Avoid running CI on markdown-only pull requests
Update the relevant set of workflows defined in the .github/workflows directory and avoid running the CI-related jobs when PRs only contain markdown-only changes. Previously, this functionality was achieved through the paths_ignore workflow syntax, but that keyword doesn't play well with repositories that have setup explicit required action context's through branch protection. This results in documentation-only PRs with the requisite labels present being gated as those skipped jobs are reported as unknown checks and automatic merging tooling cannot perform the merge. See [1] for more information on this behavior. [1] https://i.8713187.xyzmunity/t/path-filtering-on-required-pull-request-checks/18402/3 Signed-off-by: timflannagan <[email protected]>
1 parent e861c75 commit 7a8b587

File tree

7 files changed

+99
-0
lines changed

7 files changed

+99
-0
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
name: ci
22
on:
3+
push:
34
pull_request:
45
jobs:
6+
skip_check:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
10+
steps:
11+
- id: skip_check
12+
uses: fkirc/[email protected]
13+
with:
14+
paths_ignore: '["**/*.md"]'
15+
cancel_others: 'true'
16+
concurrent_skipping: 'outdated_runs'
17+
skip_after_successful_duplicate: 'true'
518
image:
619
runs-on: ubuntu-latest
20+
needs: skip_check
21+
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
722
steps:
823
- name: Check out the repo
924
uses: actions/checkout@v2

.github/workflows/e2e-kind.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,22 @@ on:
44
schedule:
55
- cron: '0 0 * * *' # daily to pick up releases
66
jobs:
7+
skip_check:
8+
runs-on: ubuntu-latest
9+
outputs:
10+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
11+
steps:
12+
- id: skip_check
13+
uses: fkirc/[email protected]
14+
with:
15+
paths_ignore: '["**/*.md"]'
16+
cancel_others: 'true'
17+
concurrent_skipping: 'outdated_runs'
18+
skip_after_successful_duplicate: 'true'
719
e2e-kind:
820
runs-on: ubuntu-latest
21+
needs: skip_check
22+
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
923
steps:
1024
- uses: actions/checkout@v2
1125
- uses: actions/setup-go@v2

.github/workflows/e2e-minikube.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,22 @@ on:
44
schedule:
55
- cron: '0 0 * * *' # daily to pick up releases
66
jobs:
7+
skip_check:
8+
runs-on: ubuntu-latest
9+
outputs:
10+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
11+
steps:
12+
- id: skip_check
13+
uses: fkirc/[email protected]
14+
with:
15+
paths_ignore: '["**/*.md"]'
16+
cancel_others: 'true'
17+
concurrent_skipping: 'outdated_runs'
18+
skip_after_successful_duplicate: 'true'
719
e2e-minikube:
820
runs-on: ubuntu-latest
21+
needs: skip_check
22+
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
923
steps:
1024
- uses: actions/checkout@v2
1125
- uses: actions/setup-go@v2

.github/workflows/e2e-tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,22 @@ on:
55
- master
66
pull_request:
77
jobs:
8+
skip_check:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
12+
steps:
13+
- id: skip_check
14+
uses: fkirc/[email protected]
15+
with:
16+
paths_ignore: '["**/*.md"]'
17+
cancel_others: 'true'
18+
concurrent_skipping: 'outdated_runs'
19+
skip_after_successful_duplicate: 'true'
820
e2e-tests:
921
runs-on: ubuntu-latest
22+
needs: skip_check
23+
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
1024
steps:
1125
- uses: actions/checkout@v2
1226
- uses: actions/setup-go@v2

.github/workflows/sanity.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,22 @@ on:
66
- '**'
77
pull_request:
88
jobs:
9+
skip_check:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
13+
steps:
14+
- id: skip_check
15+
uses: fkirc/[email protected]
16+
with:
17+
paths_ignore: '["**/*.md"]'
18+
cancel_others: 'true'
19+
concurrent_skipping: 'outdated_runs'
20+
skip_after_successful_duplicate: 'true'
921
sanity:
1022
runs-on: ubuntu-latest
23+
needs: skip_check
24+
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
1125
steps:
1226
- uses: actions/checkout@v2
1327
- uses: actions/setup-go@v2

.github/workflows/unit.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,22 @@ on:
55
- master
66
pull_request:
77
jobs:
8+
skip_check:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
12+
steps:
13+
- id: skip_check
14+
uses: fkirc/[email protected]
15+
with:
16+
paths_ignore: '["**/*.md"]'
17+
cancel_others: 'true'
18+
concurrent_skipping: 'outdated_runs'
19+
skip_after_successful_duplicate: 'true'
820
unit:
921
runs-on: ubuntu-latest
22+
needs: skip_check
23+
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
1024
steps:
1125
- uses: actions/checkout@v2
1226
- uses: actions/setup-go@v2

.github/workflows/verify.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,22 @@ on:
55
- master
66
pull_request:
77
jobs:
8+
skip_check:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
12+
steps:
13+
- id: skip_check
14+
uses: fkirc/[email protected]
15+
with:
16+
paths_ignore: '["**/*.md"]'
17+
cancel_others: 'true'
18+
concurrent_skipping: 'outdated_runs'
19+
skip_after_successful_duplicate: 'true'
820
verify:
921
runs-on: ubuntu-latest
22+
needs: skip_check
23+
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
1024
steps:
1125
- uses: actions/checkout@v2
1226
- uses: actions/setup-go@v2

0 commit comments

Comments
 (0)