2019-11-26 19:02:48 -08:00
|
|
|
name: Android Docker Image CI
|
2019-11-24 13:31:20 -08:00
|
|
|
|
2020-04-27 09:04:56 -07:00
|
|
|
on:
|
2024-01-07 15:05:29 +13:00
|
|
|
push:
|
2024-02-10 20:57:19 +13:00
|
|
|
branches:
|
|
|
|
- master
|
2024-01-07 15:05:29 +13:00
|
|
|
paths:
|
2024-01-20 01:05:14 +13:00
|
|
|
- scripts/docker/android-build-container/**
|
|
|
|
- .github/workflows/android-dockerimage.yml
|
2020-04-27 09:04:56 -07:00
|
|
|
|
2019-11-24 13:31:20 -08:00
|
|
|
jobs:
|
|
|
|
android-build-container:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2024-01-07 15:05:29 +13:00
|
|
|
VERSION: ${{ '5.15.2' }} # the version numbers here is based on the Qt version, the third digit is the rev of the docker image
|
2019-11-24 13:31:20 -08:00
|
|
|
|
|
|
|
steps:
|
2024-05-11 17:33:54 +12:00
|
|
|
- uses: actions/checkout@v4
|
2019-11-24 13:31:20 -08:00
|
|
|
|
2024-01-07 15:05:29 +13:00
|
|
|
- name: Build the name for the docker image
|
|
|
|
id: build_name
|
2019-11-24 13:31:20 -08:00
|
|
|
run: |
|
2024-05-11 17:33:54 +12:00
|
|
|
v=$VERSION
|
|
|
|
b=$GITHUB_REF # -BRANCH suffix, unless the branch is master
|
2019-11-26 16:32:39 -08:00
|
|
|
b=${b/refs\/heads\//}
|
2019-11-28 13:57:08 -08:00
|
|
|
b=${b,,} # the name needs to be all lower case
|
2019-11-26 16:32:39 -08:00
|
|
|
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
2024-05-11 17:33:54 +12:00
|
|
|
echo "NAME=$GITHUB_REPOSITORY_OWNER/android-build${b}:${v}" >> $GITHUB_OUTPUT
|
2019-11-24 14:14:56 -08:00
|
|
|
|
|
|
|
- name: Build and Publish Linux Docker image to Dockerhub
|
2024-01-07 15:05:29 +13:00
|
|
|
uses: elgohr/Publish-Docker-Github-Action@v5
|
2019-11-24 14:14:56 -08:00
|
|
|
with:
|
2024-01-07 15:05:29 +13:00
|
|
|
name: ${{ steps.build_name.outputs.NAME }}
|
2019-11-24 14:14:56 -08:00
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
dockerfile: 'Dockerfile'
|
|
|
|
workdir: './scripts/docker/android-build-container/'
|