diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-11-26 16:32:39 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-11-28 11:12:59 -0800 |
commit | 467cae065141e412c4a8e36dadc8b009fe6aee96 (patch) | |
tree | e8b486f32d97608e3effef65461a7dd045edbdb2 /.github/workflows/linux-dockerimage.yml | |
parent | 9147e83b8cec585d9d110ab8d604c6613d7c6357 (diff) | |
download | subsurface-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/linux-dockerimage.yml')
-rw-r--r-- | .github/workflows/linux-dockerimage.yml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/.github/workflows/linux-dockerimage.yml b/.github/workflows/linux-dockerimage.yml index 9dd0106c8..e978132a8 100644 --- a/.github/workflows/linux-dockerimage.yml +++ b/.github/workflows/linux-dockerimage.yml @@ -23,7 +23,10 @@ jobs: - name: set env run: | v=${{ env.VERSION }} - echo "::set-env name=NAME::subsurface/trusty-qt512:${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/trusty-qt512${b}:${v}" - name: Build and Publish Linux Docker image to Dockerhub uses: elgohr/Publish-Docker-Github-Action@master |