Move branch declaration into env var to avoid having branch name be executable (#39636)

This commit is contained in:
Ian Littman
2026-02-10 14:11:17 -06:00
committed by GitHub
parent 6570e8846a
commit e15061fe7a
@@ -71,8 +71,9 @@ jobs:
- name: Compute version from branch
id: compute_version
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
run: |
BRANCH="${{ github.head_ref || github.ref_name }}"
VERSION=$(tools/version-from-branch.sh "$BRANCH" 2>/dev/null)
if [ -z "$VERSION" ]; then
# Fall back to default snapshot version