summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-05 10:36:45 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-05 15:51:29 -0800
commitf9910caa353797dff45379a0cf23ea9934bad213 (patch)
tree2c0540d31b64508b5d822a22abfe189dda4189e8 /.github/workflows
parent5e05a183958dc14b5f569e72d1f21453e2a81c40 (diff)
downloadsubsurface-f9910caa353797dff45379a0cf23ea9934bad213.tar.gz
GitHub Actions: fix typo extracting the branch name
Also deal more gracefully with other potential bugs so that we don't add an spurious '-' at the end if the branch is empty for some reason (as that makes the image name invalid). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/mxe-dockerimage-stage2.yml4
1 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/mxe-dockerimage-stage2.yml b/.github/workflows/mxe-dockerimage-stage2.yml
index 5e56f68cd..de286703c 100644
--- a/.github/workflows/mxe-dockerimage-stage2.yml
+++ b/.github/workflows/mxe-dockerimage-stage2.yml
@@ -21,10 +21,10 @@ jobs:
run: |
v=${{ github.event.action }}
s=".stage1"
- b=${{ github.event.client_payload.target_branc }} # -BRANCH suffix, unless the branch is master
+ b=${{ github.event.client_payload.target_branch }} # -BRANCH suffix, unless the branch is master
b=${b/refs\/heads\//}
b=${b,,} # the name needs to be all lower case
- if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
+ if [ "$b" = "master" ] || [ "$b" = "" ] ; then b="" ; else b="-$b" ; fi
echo "::set-env name=VERSION::${v}${s}"
echo "::set-env name=NAME::subsurface/mxe-build-container${b}:${v}"