mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
GitHub Actions: add branch name to docker image name
Unless we're on master. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9147e83b8c
commit
467cae0651
4 changed files with 16 additions and 4 deletions
5
.github/workflows/android-dockerimage.yml
vendored
5
.github/workflows/android-dockerimage.yml
vendored
|
@ -25,7 +25,10 @@ jobs:
|
||||||
- name: set env
|
- name: set env
|
||||||
run: |
|
run: |
|
||||||
v=${{ env.VERSION }}
|
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
|
- name: Build and Publish Linux Docker image to Dockerhub
|
||||||
uses: elgohr/Publish-Docker-Github-Action@master
|
uses: elgohr/Publish-Docker-Github-Action@master
|
||||||
|
|
5
.github/workflows/linux-dockerimage.yml
vendored
5
.github/workflows/linux-dockerimage.yml
vendored
|
@ -23,7 +23,10 @@ jobs:
|
||||||
- name: set env
|
- name: set env
|
||||||
run: |
|
run: |
|
||||||
v=${{ env.VERSION }}
|
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
|
- name: Build and Publish Linux Docker image to Dockerhub
|
||||||
uses: elgohr/Publish-Docker-Github-Action@master
|
uses: elgohr/Publish-Docker-Github-Action@master
|
||||||
|
|
5
.github/workflows/mxe-dockerimage-stage1.yml
vendored
5
.github/workflows/mxe-dockerimage-stage1.yml
vendored
|
@ -26,7 +26,10 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
v=${{ env.VERSION }}
|
v=${{ env.VERSION }}
|
||||||
s=".stage1"
|
s=".stage1"
|
||||||
echo "::set-env name=NAME::subsurface/mxe-build-container:${v}${s}"
|
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/mxe-build-container${b}:${v}${s}"
|
||||||
|
|
||||||
- name: Build and Publish stage 1 Docker image to Dockerhub
|
- name: Build and Publish stage 1 Docker image to Dockerhub
|
||||||
uses: elgohr/Publish-Docker-Github-Action@master
|
uses: elgohr/Publish-Docker-Github-Action@master
|
||||||
|
|
5
.github/workflows/mxe-dockerimage-stage2.yml
vendored
5
.github/workflows/mxe-dockerimage-stage2.yml
vendored
|
@ -21,8 +21,11 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
v=${{ github.event.action }}
|
v=${{ github.event.action }}
|
||||||
s=".stage1"
|
s=".stage1"
|
||||||
|
b=${{ github.event.client_payload.target_branc }} # -BRANCH suffix, unless the branch is master
|
||||||
|
b=${b/refs\/heads\//}
|
||||||
|
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
||||||
echo "::set-env name=VERSION::${v}${s}"
|
echo "::set-env name=VERSION::${v}${s}"
|
||||||
echo "::set-env name=NAME::subsurface/mxe-build-container:${v}"
|
echo "::set-env name=NAME::subsurface/mxe-build-container${b}:${v}"
|
||||||
|
|
||||||
- name: Build and Publish stage 2 Docker image to Dockerhub
|
- name: Build and Publish stage 2 Docker image to Dockerhub
|
||||||
uses: elgohr/Publish-Docker-Github-Action@master
|
uses: elgohr/Publish-Docker-Github-Action@master
|
||||||
|
|
Loading…
Reference in a new issue