Skip to content

Commit 96f12db

Browse files
authored
Cancel workflows for previous commits in a PR when new commits are pushed (#867)
1 parent f54d7c0 commit 96f12db

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

.github/workflows/android.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ env:
1515
GITHUB_TOKEN: ${{ github.token }}
1616
xcodeVersion: "12.4" # Only affects Mac runners, and only for prerequisites.
1717

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
20+
cancel-in-progress: true
21+
1822
jobs:
1923
prepare_matrix:
2024
runs-on: ubuntu-latest

.github/workflows/checks.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ env:
1111
statusLabelFailed: "tests: failed"
1212
skipReleaseNotesLabel: "skip-release-notes"
1313

14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
16+
cancel-in-progress: true
17+
1418
jobs:
1519
file_format_check:
1620
runs-on: ubuntu-latest

.github/workflows/checks_secure.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
pull_request_target:
66
types: [synchronize]
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
dismiss_stale_approvals:
1014
# Dismiss stale approvals for non-admins or if this PR comes from a fork.

.github/workflows/desktop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ env:
1414
CCACHE_DIR: ${{ github.workspace }}/ccache_dir
1515
GITHUB_TOKEN: ${{ github.token }}
1616

17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
19+
cancel-in-progress: true
20+
1721
jobs:
1822
prepare_matrix:
1923
runs-on: ubuntu-latest

.github/workflows/ios.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
env:
1414
GITHUB_TOKEN: ${{ github.token }}
1515

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
18+
cancel-in-progress: true
19+
1620
jobs:
1721
prepare_matrix:
1822
runs-on: ubuntu-latest

.github/workflows/lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request:
55
types: [opened,synchronize]
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
lint_warnings_check_and_comment:
913
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)