mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
5e05a18395
commit
f9910caa35
1 changed files with 2 additions and 2 deletions
4
.github/workflows/mxe-dockerimage-stage2.yml
vendored
4
.github/workflows/mxe-dockerimage-stage2.yml
vendored
|
@ -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}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue