subsurface/.github/workflows/android-dockerimage.yml
Dirk Hohndel 467cae0651 GitHub Actions: add branch name to docker image name
Unless we're on master.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28 11:12:59 -08:00

40 lines
1.2 KiB
YAML

name: Android Docker Image CI
on:
push:
paths:
- scripts/docker/android-build-container/Dockerfile
- .github/workflows/android-docker*
jobs:
android-build-container:
runs-on: ubuntu-latest
env:
VERSION: ${{ '5.13.10' }} # the version numbers here is based on the Qt version, the third digit is the rev of the docker image
steps:
- uses: actions/checkout@v1
- name: Get our pre-reqs
run: |
cd scripts/docker/android-build-container
bash download.sh
sed -ie 's/^sudo/#sudo/' setup-docker.sh
bash setup-docker.sh
- name: set env
run: |
v=${{ env.VERSION }}
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
with:
name: ${{ env.NAME }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: 'Dockerfile'
workdir: './scripts/docker/android-build-container/'