From 551a0f6faeae7575717a2b3f912ac030a78f9207 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Fri, 28 Nov 2025 09:18:14 +0100 Subject: [PATCH] workflows: fix invalid usage of `github.event_name` The condition was wrong because `github.event_name` will never be `labeled` since this field always refers to the actual type of the event, which in this case will always be `pull_request`. We need to determine which type of activity has triggered the workflow via the `github.event.action` context. --- .github/workflows/backbot.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backbot.yml b/.github/workflows/backbot.yml index 4edf830e9..74e75b96c 100644 --- a/.github/workflows/backbot.yml +++ b/.github/workflows/backbot.yml @@ -11,7 +11,12 @@ permissions: {} jobs: backbot: runs-on: ubuntu-latest - if: ${{ github.repository_owner == 'Icinga' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith(github.event.label.name, 'backport-to-support/')) }} + if: | + github.repository_owner == 'Icinga' && + github.event.pull_request.merged == true && ( + github.event.action != 'labeled' || + startsWith(github.event.label.name, 'backport-to-support/') + ) steps: - name: Generate GitHub Installation Access Token # Use GitHub App to generate an installation access token to allow PRs created by Backbot to trigger workflows.