Skip to content

Commit

Permalink
Add concurrency rules on major workflows (#59)
Browse files Browse the repository at this point in the history
* Add concurrency rules on major workflows

* Add concurrency rules on this repo workflows

* Escape github workflow syntax
  • Loading branch information
fcollonval committed Jan 6, 2024
1 parent 1333077 commit b43bcae
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/check-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
schedule:
- cron: "0 0 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
schedule:
- cron: "0 0 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
names:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion template/.github/workflows/build.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ on:
branches: main
pull_request:
branches: '*'

{% raw %}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
{% endraw %}
jobs:
build:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion template/.github/workflows/check-release.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
branches: ["main"]
pull_request:
branches: ["*"]

{% raw %}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
{% endraw %}
jobs:
check_release:
runs-on: ubuntu-latest
Expand Down

0 comments on commit b43bcae

Please sign in to comment.