summaryrefslogtreecommitdiffstats
path: root/.github/workflows/android-dockerimage.yml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-26 16:32:39 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-28 11:12:59 -0800
commit467cae065141e412c4a8e36dadc8b009fe6aee96 (patch)
treee8b486f32d97608e3effef65461a7dd045edbdb2 /.github/workflows/android-dockerimage.yml
parent9147e83b8cec585d9d110ab8d604c6613d7c6357 (diff)
downloadsubsurface-467cae065141e412c4a8e36dadc8b009fe6aee96.tar.gz
GitHub Actions: add branch name to docker image name
Unless we're on master. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to '.github/workflows/android-dockerimage.yml')
-rw-r--r--.github/workflows/android-dockerimage.yml5
1 files changed, 4 insertions, 1 deletions
diff --git a/.github/workflows/android-dockerimage.yml b/.github/workflows/android-dockerimage.yml
index c8f594109..d67831e43 100644
--- a/.github/workflows/android-dockerimage.yml
+++ b/.github/workflows/android-dockerimage.yml
@@ -25,7 +25,10 @@ jobs:
- name: set env
run: |
v=${{ env.VERSION }}
- echo "::set-env name=NAME::subsurface/android-build-container:${v}"
+ b=${{ github.ref }} # -BRANCH suffix, unless the branch is master
+ b=${b/refs\/heads\//}
+ if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
+ echo "::set-env name=NAME::subsurface/android-build-container${b}:${v}"
- name: Build and Publish Linux Docker image to Dockerhub
uses: elgohr/Publish-Docker-Github-Action@master