2019-11-27 03:02:48 +00:00
|
|
|
name: Android Docker Image CI
|
2019-11-24 21:31:20 +00:00
|
|
|
|
2020-04-24 23:06:56 +00:00
|
|
|
# -- disabled for now, as the resulting image is HUGE and causes our
|
|
|
|
# Android builds to fail
|
|
|
|
#on:
|
|
|
|
# push:
|
|
|
|
# paths:
|
|
|
|
# - scripts/docker/android-build-container/Dockerfile
|
|
|
|
# - .github/workflows/android-docker*
|
2019-11-24 21:31:20 +00:00
|
|
|
|
2020-04-27 16:04:56 +00:00
|
|
|
# this is here to prevent errors about not having an on: clause
|
|
|
|
on:
|
|
|
|
repository_dispatch:
|
|
|
|
types:
|
|
|
|
- unused
|
|
|
|
|
2019-11-24 21:31:20 +00:00
|
|
|
jobs:
|
|
|
|
android-build-container:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2019-11-25 20:57:32 +00:00
|
|
|
VERSION: ${{ '5.13.10' }} # the version numbers here is based on the Qt version, the third digit is the rev of the docker image
|
2019-11-24 21:31:20 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2019-11-24 22:14:56 +00:00
|
|
|
- name: set env
|
2019-11-24 21:31:20 +00:00
|
|
|
run: |
|
2019-11-24 22:14:56 +00:00
|
|
|
v=${{ env.VERSION }}
|
2019-11-27 00:32:39 +00:00
|
|
|
b=${{ github.ref }} # -BRANCH suffix, unless the branch is master
|
|
|
|
b=${b/refs\/heads\//}
|
2019-11-28 21:57:08 +00:00
|
|
|
b=${b,,} # the name needs to be all lower case
|
2019-11-27 00:32:39 +00:00
|
|
|
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
|
|
|
echo "::set-env name=NAME::subsurface/android-build-container${b}:${v}"
|
2019-11-24 22:14:56 +00:00
|
|
|
|
|
|
|
- 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/'
|