Skip to content

Commit c3d8ba5

Browse files
ci: Add skip check to other actions
1 parent 8a9f5f6 commit c3d8ba5

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

.github/workflows/test-docs.yml

+15
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,22 @@ on:
66
- main
77

88
jobs:
9+
pre_job:
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/skip-duplicate-actions@v5
16+
with:
17+
# cancel previous builds if a new commit is pushed
18+
cancel_others: 'true'
19+
# only run on push *or* pull_request, not both
20+
concurrent_skipping: 'same_content_newer'
21+
922
test-docs:
23+
needs: pre_job
24+
if: needs.pre_job.outputs.should_skip != 'true'
1025
runs-on: ubuntu-latest
1126
steps:
1227
- name: Install Dependencies

.github/workflows/test-linux.yml

+16
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,23 @@ name: Build and run tests (Linux)
33
on: [push, pull_request]
44

55
jobs:
6+
pre_job:
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/skip-duplicate-actions@v5
13+
with:
14+
paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]'
15+
# cancel previous builds if a new commit is pushed
16+
cancel_others: 'true'
17+
# only run on push *or* pull_request, not both
18+
concurrent_skipping: 'same_content_newer'
19+
620
test-linux:
21+
needs: pre_job
22+
if: needs.pre_job.outputs.should_skip != 'true'
723
runs-on: ${{ matrix.os.id }}
824
strategy:
925
matrix:

.github/workflows/test-macos.yml

+16
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,23 @@ name: Build and run tests (macOS)
33
on: [push, pull_request]
44

55
jobs:
6+
pre_job:
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/skip-duplicate-actions@v5
13+
with:
14+
paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]'
15+
# cancel previous builds if a new commit is pushed
16+
cancel_others: 'true'
17+
# only run on push *or* pull_request, not both
18+
concurrent_skipping: 'same_content_newer'
19+
620
test-macos:
21+
needs: pre_job
22+
if: needs.pre_job.outputs.should_skip != 'true'
723
runs-on: ${{ matrix.os.id }}
824
strategy:
925
matrix:

0 commit comments

Comments
 (0)