Move branch declaration into env var to avoid having branch name be executable (#39636)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user