From 2c9ce8b319fd5a116d51ac476004dfba7aab2e0e Mon Sep 17 00:00:00 2001 From: Kobi Hikri Date: Tue, 28 Jul 2026 23:37:16 +0300 Subject: [PATCH] ci: read branch names from env instead of interpolating them into the shell (#10470) --- .github/workflows/container_foundationdb_version.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/container_foundationdb_version.yml b/.github/workflows/container_foundationdb_version.yml index 052ad57c8..d88b9fc50 100644 --- a/.github/workflows/container_foundationdb_version.yml +++ b/.github/workflows/container_foundationdb_version.yml @@ -140,13 +140,17 @@ jobs: - name: Determine branch to build id: branch + env: + INPUT_REF: ${{ inputs.seaweedfs_ref }} + HEAD_REF: ${{ github.head_ref }} + REF_NAME: ${{ github.ref_name }} run: | - if [ -n "${{ inputs.seaweedfs_ref }}" ]; then - echo "branch=${{ inputs.seaweedfs_ref }}" >> "$GITHUB_OUTPUT" + if [ -n "$INPUT_REF" ]; then + echo "branch=$INPUT_REF" >> "$GITHUB_OUTPUT" elif [ "${{ github.event_name }}" = "pull_request" ]; then - echo "branch=${{ github.head_ref }}" >> "$GITHUB_OUTPUT" + echo "branch=$HEAD_REF" >> "$GITHUB_OUTPUT" else - echo "branch=${{ github.ref_name }}" >> "$GITHUB_OUTPUT" + echo "branch=$REF_NAME" >> "$GITHUB_OUTPUT" fi - name: Build and push image