Skip to content

Commit

Permalink
Re-activated the GitHub action to build and publish the docker image.
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Keller <[email protected]>
  • Loading branch information
mikeller committed Jan 7, 2024
1 parent 856f64d commit b15c4ff
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,48 +1,42 @@
name: Android Docker Image CI

# -- 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*

# this is here to prevent errors about not having an on: clause
on:
repository_dispatch:
types:
- unused
workflow_dispatch:
push:
paths:
- scripts/docker/android-build-container
- .github/workflows/android-docker*
- packaging/android/android-build-setup.sh
- packaging/android/variables.sh

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
VERSION: ${{ '5.15.2' }} # 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
- name: Build the name for the docker image
id: build_name
run: |
v=${{ env.VERSION }}
b=${{ github.ref }} # -BRANCH suffix, unless the branch is master
b=${b/refs\/heads\//}
b=${b,,} # the name needs to be all lower case
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
echo "::set-env name=NAME::subsurface/android-build-container${b}:${v}"
echo "NAME=mikeller/android-build${b}:${v}" >> $GITHUB_OUTPUT
- name: Build and Publish Linux Docker image to Dockerhub
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: ${{ env.NAME }}
name: ${{ steps.build_name.outputs.NAME }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: 'Dockerfile'
Expand Down
1 change: 1 addition & 0 deletions scripts/docker/android-build-container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN apt-get update && \

WORKDIR /android

# Scrape the manually curated Qt install from the previous build image
COPY --from=base /android/5.15.1 5.15.1

# install, NDK and SDK there, plus the three files from the Subsurface
Expand Down
6 changes: 0 additions & 6 deletions scripts/docker/android-build-container/download.sh

This file was deleted.

4 changes: 4 additions & 0 deletions scripts/docker/android-build-container/setup-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@
cp ../../../packaging/android/android-build-setup.sh .
cp ../../../packaging/android/variables.sh .

if [ "$1X" == "-no-docker-buildX" ]; then
exit 0
fi

# create the container (this takes a while)
docker build -t android-build .

0 comments on commit b15c4ff

Please sign in to comment.