Skip to content

Commit 3e00a15

Browse files
committed
Use concurrency for GitHub Actions workflow
Same as: rubocop/rubocop-rspec#1539 This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled. Refs: https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
1 parent 05be11b commit 3e00a15

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/linting.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Linting
22
on:
33
- pull_request
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.ref }}
6+
cancel-in-progress: true
47
jobs:
58
yamllint:
69
name: Yamllint

.github/workflows/spell_checking.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Spell Checking
22

33
on: [pull_request]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
59
jobs:
610
codespell:
711
name: Check spelling of all files with codespell

0 commit comments

Comments
 (0)