ci: fix concurrency group name (#5121)

- Add missing '$' to github.event_name
- Default to github.head_ref (pull_request event) and fall back to github.ref
  (merge_group and push events)
This commit is contained in:
Marco Ferrari 2024-01-10 10:05:41 +01:00 committed by GitHub
parent 6f70adee89
commit 2d79d17e6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,10 @@ jobs:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-{{ github.event_name }}-${{ matrix.images.target }}
# Ref: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# github.head_ref: head_ref or source branch of the pull request
# github.ref: ref of the branch that triggered the workflow
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-${{ github.event_name }}-${{ matrix.images.target }}
cancel-in-progress: true
strategy:
fail-fast: false