summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yaml
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-11-14 14:20:51 -0500
committerNat Goodspeed <nat@lindenlab.com>2023-11-14 14:20:51 -0500
commit59eeaed1187e7592fd83380045916f2d8b9d58e7 (patch)
treed7f5dd4da5d6e36c347e2c5836d2f05909a827fc /.github/workflows/build.yaml
parent9e99bb04a32f2ecc0f0b99686ce5a7adb356596d (diff)
SL-20546: Try harder to infer the branch corresponding to build tag.
Diffstat (limited to '.github/workflows/build.yaml')
-rw-r--r--.github/workflows/build.yaml8
1 files changed, 3 insertions, 5 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 895fb00506..abf14b015e 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -178,11 +178,9 @@ jobs:
then viewer_channel="${GITHUB_REF_NAME%#*}"
export viewer_channel="${viewer_channel//_/ }"
# Since GITHUB_REF_NAME is a tag rather than a branch, we need
- # to discover to what branch this tag corresponds. Get the tip
- # commit (for the tag) and then ask for branches containing it.
- # Assume GitHub cloned only this tag and its containing branch.
- viewer_branch="$(git branch --contains "$(git log -n 1 --format=%h)" |
- grep -v '(HEAD')"
+ # to discover to what branch this tag corresponds.
+ viewer_branch="$(python3 .github/workflows/which_branch.py \
+ --token "${{ github.token }}" ${{ github.workflow_sha }})"
else export viewer_channel="Second Life Test"
viewer_branch="${GITHUB_REF_NAME}"
fi