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>2024-03-01 16:13:29 -0500
commita13e70aeffb87e2934f1b01f85dc2c78ea10e20c (patch)
tree2e1f49c6a628a3c38d82c481d7d7d1f7edcc6984 /.github/workflows/build.yaml
parentcac7023996d691f00101429830a23b2cef3a2f83 (diff)
SL-20546: Try harder to infer the branch corresponding to build tag.
(cherry picked from commit 59eeaed1187e7592fd83380045916f2d8b9d58e7)
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 c0bec11275..6c40c173db 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