Merge pull request #6 from twocolors/main #65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Android CI | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'Dockerfile' | |
- 'Dockerfile.gpu' | |
- '.github/workflows/*' | |
- 'deps/*' | |
- 'keys/*' | |
- 'scripts/*' | |
jobs: | |
# Builds all Android API images with API level 33 and below. | |
build-apis: | |
strategy: | |
matrix: | |
version: [33, 32, 31, 30, 29, 28] | |
image: [ | |
{ name: 'google_apis', suffix: '' }, | |
{ name: 'google_apis_playstore', suffix: '-playstore' } | |
] | |
gpu: [ | |
{ file: 'Dockerfile', suffix: '' }, | |
{ file: 'Dockerfile.gpu', suffix: '-cuda' } | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Build Docker image api-${{ matrix.version }}${{ matrix.image.suffix }} | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: ${{ matrix.gpu.file }} | |
tags: halimqarroum/docker-android:api-${{ matrix.version }}${{ matrix.image.suffix }}${{ matrix.gpu.suffix }} | |
build-args: | | |
API_LEVEL=${{ matrix.version }} | |
IMG_TYPE=${{ matrix.image.name }} | |
# Builds a minimal image without any Android SDK images. | |
build-minimal: | |
strategy: | |
matrix: | |
gpu: [ | |
{ file: 'Dockerfile', suffix: '' }, | |
{ file: 'Dockerfile.gpu', suffix: '-cuda' } | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Build minimal Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: ${{ matrix.gpu.file }} | |
tags: halimqarroum/docker-android:minimal${{ matrix.gpu.suffix }} | |
build-args: INSTALL_ANDROID_SDK=0 |