Skip to content

Commit 4cf8d47

Browse files
pjonssonomad
authored andcommitted
CI: cancel previous jobs on PR updates
1 parent 1a22c3c commit 4cf8d47

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
pull_request:
55
push:
66

7+
# When a PR is updated, cancel the jobs from the previous version. Merges
8+
# do not define head_ref, so use run_id to never cancel those jobs.
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
713
jobs:
814
build-wheels:
915
timeout-minutes: 15

.github/workflows/publish-pypi.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Publish to PyPI
33
on:
44
workflow_dispatch:
55

6+
# When a PR is updated, cancel the jobs from the previous version. Merges
7+
# do not define head_ref, so use run_id to never cancel those jobs.
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
612
jobs:
713
publish-pypi:
814
if: github.repository == 'opendatacube/odc-geo'

0 commit comments

Comments
 (0)