Skip to content

Commit b09de81

Browse files
authored
GHA concurrency (#6210)
1 parent aab856b commit b09de81

File tree

4 files changed

+12
-54
lines changed

4 files changed

+12
-54
lines changed

.github/workflows/cancel-duplicate-runs.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/ci-additional.yaml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,14 @@ on:
88
- "*"
99
workflow_dispatch: # allows you to trigger manually
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1115
jobs:
12-
skip-duplicate-jobs:
13-
runs-on: ubuntu-latest
14-
if: |
15-
github.repository == 'pydata/xarray'
16-
&& (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-
uses: fkirc/[email protected]
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/**"]'
2716
detect-ci-trigger:
2817
name: detect ci trigger
2918
runs-on: ubuntu-latest
30-
needs: skip-duplicate-jobs
31-
if: ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }}
3219
outputs:
3320
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
3421
steps:
@@ -129,8 +116,6 @@ jobs:
129116
doctest:
130117
name: Doctests
131118
runs-on: "ubuntu-latest"
132-
needs: skip-duplicate-jobs
133-
if: ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }}
134119
defaults:
135120
run:
136121
shell: bash -l {0}

.github/workflows/ci.yaml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,13 @@ on:
88
- "*"
99
workflow_dispatch: # allows you to trigger manually
1010

11-
jobs:
12-
skip-duplicate-jobs:
13-
runs-on: ubuntu-latest
14-
if: |
15-
github.repository == 'pydata/xarray'
16-
&& (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-
uses: fkirc/[email protected]
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/**"]'
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
2714

15+
jobs:
2816
detect-ci-trigger:
2917
name: detect ci trigger
30-
needs: skip-duplicate-jobs
31-
if: ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }}
3218
runs-on: ubuntu-latest
3319
outputs:
3420
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
@@ -125,8 +111,6 @@ jobs:
125111

126112
event_file:
127113
name: "Event File"
128-
needs: skip-duplicate-jobs
129-
if: ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }}
130114
runs-on: ubuntu-latest
131115
steps:
132116
- name: Upload

.github/workflows/upstream-dev-ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
- cron: "0 0 * * *" # Daily “At 00:00” UTC
1111
workflow_dispatch: # allows you to trigger the workflow run manually
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
detect-ci-trigger:
1519
name: detect upstream-dev ci trigger

0 commit comments

Comments
 (0)