name: Docker Android CI on: push: branches: [ "main" ] paths: - 'Dockerfile' - '.github/workflows/*' - 'deps/*' - 'keys/*' - 'scripts/*' jobs: # Builds all Android API images with API level 30 and above. build-api-30x: strategy: matrix: version: [33, 32, 31, 30] image: ['google_apis', 'google_apis_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 with Android 33 uses: docker/build-push-action@v4 with: push: true tags: halimqarroum/docker-android:api-33 build-args: | API_LEVEL=${{ matrix.version }} IMG_TYPE=${{ matrix.image }} build-api-29: 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 with Android 29 uses: docker/build-push-action@v4 with: push: true tags: halimqarroum/docker-android:api-29 build-args: API_LEVEL=29 build-api-28: 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 with Android 28 uses: docker/build-push-action@v4 with: push: true tags: halimqarroum/docker-android:api-28 build-args: | "API_LEVEL=28" "ARCHITECTURE=x86" build-api-28-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 with Android 28 and the PlayStore uses: docker/build-push-action@v4 with: push: true tags: halimqarroum/docker-android:api-28-playstore build-args: | "API_LEVEL=28" "ARCHITECTURE=x86" "IMG_TYPE=google_apis_playstore" 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