Skip to content

Commit b08702a

Browse files
chore: github workflow: cancel prior running jobs on new push
If new new push is done to a pull-request, then cancel any already running github workflow jobs in order to conserve resources.
1 parent 3a7d6f6 commit b08702a

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

.github/workflows/docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Docs
22

3+
# If a pull-request is pushed then cancel all previously running jobs related
4+
# to that pull-request
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
7+
cancel-in-progress: true
8+
39
on:
410
push:
511
branches:

.github/workflows/lint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Lint
22

3+
# If a pull-request is pushed then cancel all previously running jobs related
4+
# to that pull-request
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
7+
cancel-in-progress: true
8+
39
on:
410
push:
511
branches:

.github/workflows/pre_commit.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: pre_commit
22

3+
# If a pull-request is pushed then cancel all previously running jobs related
4+
# to that pull-request
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
7+
cancel-in-progress: true
8+
39
on:
410
push:
511
branches:

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Test
22

3+
# If a pull-request is pushed then cancel all previously running jobs related
4+
# to that pull-request
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
7+
cancel-in-progress: true
8+
39
on:
410
push:
511
branches:

0 commit comments

Comments
 (0)