Files
docker-android2/.github/workflows/docker-image.yml
T

52 lines
1.6 KiB
YAML

name: Docker Android CI
on:
push:
branches: [ "main" ]
paths:
- 'Dockerfile'
- '.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, 27, 26, 25, 24, 23, 22, 21, 20]
image: [{ name: 'google_apis', suffix: '' }, { name: 'google_apis_playstore', suffix: '-playstore' }]
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
tags: halimqarroum/docker-android:api-${{ matrix.version }}${{ matrix.image.suffix }}
build-args: |
API_LEVEL=${{ matrix.version }}
IMG_TYPE=${{ matrix.image.name }}
# Builds a minimal image without any Android SDK images.
build-minimal:
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
tags: halimqarroum/docker-android:minimal
build-args: INSTALL_ANDROID_SDK=0