Skip to content

Commit

Permalink
Fix concurrency group value to avoid cancelling runs on push to maste…
Browse files Browse the repository at this point in the history
…r branch (#5243)

* Fix concurrency group value to avoid cancelling runs on push to master branch

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>

* fix

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
  • Loading branch information
harupy committed Jan 10, 2022
1 parent 19e84f6 commit cb03edb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cross-version-tests.yml
Expand Up @@ -32,8 +32,8 @@ on:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples.yml
Expand Up @@ -8,8 +8,8 @@ on:
- cron: "0 7 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/master.yml
Expand Up @@ -11,8 +11,8 @@ on:
- branch-[0-9]+.[0-9]+

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

# Use `bash --noprofile --norc -exo pipefail` by default for all `run` steps in this workflow:
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-note-category.yml
Expand Up @@ -12,8 +12,8 @@ on:
- unlabeled

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-package-build.yml
Expand Up @@ -7,8 +7,8 @@ on:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

defaults:
run:
Expand Down

0 comments on commit cb03edb

Please sign in to comment.