From bdb0e4270ca87b0b0e4c19d766b8790fb6ef7544 Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Fri, 16 May 2025 11:50:21 -0700 Subject: [PATCH] ci: updates branch name strategy fixes #24866 Signed-off-by: Ramon Roche --- .github/workflows/build_all_targets.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_all_targets.yml b/.github/workflows/build_all_targets.yml index ce4229c5b4..69c82fa11c 100644 --- a/.github/workflows/build_all_targets.yml +++ b/.github/workflows/build_all_targets.yml @@ -54,7 +54,13 @@ jobs: run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")" - id: set-branch - run: echo "::set-output name=branchname::${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" + run: | + echo "branchname=${{ + github.event_name == 'pull_request' && + format('pr-{0}', github.event.pull_request.number) || + github.head_ref || + github.ref_name + }}" >> $GITHUB_OUTPUT - name: Debug Matrix Output if: runner.debug == '1'