From 2d79d17e6e44bd859414b74282024773d0a06787 Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Wed, 10 Jan 2024 10:05:41 +0100 Subject: [PATCH] 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) --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc88d801..9b468c9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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