2019-11-27 03:02:48 +00:00
|
|
|
name: Android Docker Image CI
|
2019-11-24 21:31:20 +00:00
|
|
|
|
2020-04-27 16:04:56 +00:00
|
|
|
on:
|
2024-01-07 02:05:29 +00:00
|
|
|
push:
|
2024-02-10 07:57:19 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2024-01-07 02:05:29 +00:00
|
|
|
paths:
|
2024-01-19 12:05:14 +00:00
|
|
|
- scripts/docker/android-build-container/**
|
|
|
|
- .github/workflows/android-dockerimage.yml
|
2020-04-27 16:04:56 +00:00
|
|
|
|
2019-11-24 21:31:20 +00:00
|
|
|
jobs:
|
|
|
|
android-build-container:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2024-01-07 02:05:29 +00: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 21:31:20 +00:00
|
|
|
|
|
|
|
steps:
|
2024-05-11 05:33:54 +00:00
|
|
|
- uses: actions/checkout@v4
|
2019-11-24 21:31:20 +00:00
|
|
|
|
2024-01-07 02:05:29 +00:00
|
|
|
- name: Build the name for the docker image
|
|
|
|
id: build_name
|
2019-11-24 21:31:20 +00:00
|
|
|
run: |
|
2024-05-11 05:33:54 +00:00
|
|
|
v=$VERSION
|
|
|
|
b=$GITHUB_REF # -BRANCH suffix, unless the branch is master
|
2019-11-27 00:32:39 +00:00
|
|
|
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
|
2024-05-11 05:33:54 +00:00
|
|
|
echo "NAME=$GITHUB_REPOSITORY_OWNER/android-build${b}:${v}" >> $GITHUB_OUTPUT
|
2019-11-24 22:14:56 +00:00
|
|
|
|
|
|
|
- name: Build and Publish Linux Docker image to Dockerhub
|
2024-01-07 02:05:29 +00:00
|
|
|
uses: elgohr/Publish-Docker-Github-Action@v5
|
2019-11-24 22:14:56 +00:00
|
|
|
with:
|
2024-01-07 02:05:29 +00:00
|
|
|
name: ${{ steps.build_name.outputs.NAME }}
|
2019-11-24 22:14:56 +00:00
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
dockerfile: 'Dockerfile'
|
|
|
|
workdir: './scripts/docker/android-build-container/'
|