From dd4eea5e9a9cbd5cc26e45a8cdf9782f80e4826a Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:44:04 +0200 Subject: [PATCH] [v9.5.x] CI: fix release pr condition (#90300) CI: fix release pr condition (#90299) * Release comms should only run when the source PR is * Fix release-comms workflow condition (cherry picked from commit a28db90dd5df00b555ef32f5f96b701dcd9035e2) Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com> --- .github/workflows/release-comms.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-comms.yml b/.github/workflows/release-comms.yml index 6b39664dad0..6479457623e 100644 --- a/.github/workflows/release-comms.yml +++ b/.github/workflows/release-comms.yml @@ -22,6 +22,7 @@ on: jobs: setup: + if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')) }} name: Setup and establish latest outputs: version: ${{ steps.output.outputs.version }} @@ -35,7 +36,7 @@ jobs: echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV echo "DRY_RUN=${{ inputs.dry_run }}" >> $GITHUB_ENV echo "LATEST=${{ inputs.latest }}" >> $GITHUB_ENV - - if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') + - if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') }} run: | echo "VERSION=$(echo ${{ github.head_ref }} | sed -e 's/release\///g')" >> $GITHUB_ENV echo "DRY_RUN=true" >> $GITHUB_ENV