mirror of
https://github.com/HQarroum/docker-android.git
synced 2026-07-30 03:12:18 +00:00
68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
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
|