File tree Expand file tree Collapse file tree 3 files changed +58
-6
lines changed Expand file tree Collapse file tree 3 files changed +58
-6
lines changed Original file line number Diff line number Diff line change 99 workflow_dispatch : # allows you to trigger manually
1010
1111jobs :
12- detect-ci-trigger :
13- name : detect ci trigger
12+ skip-duplicate-jobs :
1413 runs-on : ubuntu-latest
1514 if : |
1615 github.repository == 'pydata/xarray'
1716 && (github.event_name == 'push' || github.event_name == 'pull_request')
17+ outputs :
18+ should_skip : ${{ steps.skip_check.outputs.should_skip }}
19+ steps :
20+ - id : skip_check
21+ 22+ with :
23+ # For workflows which are triggered concurrently with the same
24+ # contents, attempt to execute them exactly once.
25+ concurrent_skipping : ' same_content_newer'
26+ paths_ignore : ' ["**/doc/**"]'
27+ detect-ci-trigger :
28+ name : detect ci trigger
29+ runs-on : ubuntu-latest
30+ needs : skip-duplicate-jobs
31+ if : ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }}
1832 outputs :
1933 triggered : ${{ steps.detect-trigger.outputs.trigger-found }}
2034 steps :
@@ -115,7 +129,8 @@ jobs:
115129 doctest :
116130 name : Doctests
117131 runs-on : " ubuntu-latest"
118- if : github.repository == 'pydata/xarray'
132+ needs : skip-duplicate-jobs
133+ if : ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }}
119134 defaults :
120135 run :
121136 shell : bash -l {0}
Original file line number Diff line number Diff line change 99 workflow_dispatch : # allows you to trigger manually
1010
1111jobs :
12- detect-ci-trigger :
13- name : detect ci trigger
12+ skip-duplicate-jobs :
1413 runs-on : ubuntu-latest
1514 if : |
1615 github.repository == 'pydata/xarray'
1716 && (github.event_name == 'push' || github.event_name == 'pull_request')
17+ outputs :
18+ should_skip : ${{ steps.skip_check.outputs.should_skip }}
19+ steps :
20+ - id : skip_check
21+ 22+ with :
23+ # For workflows which are triggered concurrently with the same
24+ # contents, attempt to execute them exactly once.
25+ concurrent_skipping : ' same_content_newer'
26+ paths_ignore : ' ["**/doc/**"]'
27+
28+ detect-ci-trigger :
29+ name : detect ci trigger
30+ needs : skip-duplicate-jobs
31+ if : ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }}
32+ runs-on : ubuntu-latest
1833 outputs :
1934 triggered : ${{ steps.detect-trigger.outputs.trigger-found }}
2035 steps :
@@ -110,6 +125,8 @@ jobs:
110125
111126 event_file :
112127 name : " Event File"
128+ needs : skip-duplicate-jobs
129+ if : ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }}
113130 runs-on : ubuntu-latest
114131 steps :
115132 - name : Upload
Original file line number Diff line number Diff line change 99 - completed
1010
1111jobs :
12+
13+ skip-duplicate-jobs :
14+ runs-on : ubuntu-latest
15+ if : |
16+ github.repository == 'pydata/xarray'
17+ && (github.event_name == 'push' || github.event_name == 'pull_request')
18+ outputs :
19+ should_skip : ${{ steps.skip_check.outputs.should_skip }}
20+ steps :
21+ - id : skip_check
22+ 23+ with :
24+ # For workflows which are triggered concurrently with the same
25+ # contents, attempt to execute them exactly once.
26+ concurrent_skipping : ' same_content_newer'
27+ paths_ignore : ' ["**/doc/**"]'
28+
1229 publish-test-results :
1330 name : Publish test results
1431 runs-on : ubuntu-latest
15- if : github.event.workflow_run.conclusion != 'skipped'
32+ needs : skip-duplicate-jobs
33+ if : |
34+ needs.skip-duplicate-jobs.outputs.should_skip != 'true'
35+ && github.event.workflow_run.conclusion != 'skipped'
1636
1737 steps :
1838 - name : Download and extract artifacts
You can’t perform that action at this time.
0 commit comments