Skip to content

Android SDK Images

Android SDK Images #10

Workflow file for this run

name: Android SDK Images
on: workflow_dispatch
env:
# Look for NDK versions here:
# https://developer.android.com/ndk/downloads
NDK: 26.2.11394342
# Images path and name
IMAGE_NAME: android-sdk
IMAGE_PATH: ghcr.io/redmadrobot/android/android-sdk
jobs:
# Dirty hack to make env variables visible inside 'with'
# See https://github.com/orgs/community/discussions/26671
env:
name: Prepare environment variables
runs-on: ubuntu-latest
outputs:
ndk: ${{ steps.env.outputs.ndk }}
image-name: ${{ steps.env.outputs.image-name }}
image-path: ${{ steps.env.outputs.image-path }}
steps:
- name: Save env variables to outputs
id: env
run: |
echo "ndk=$NDK" >> $GITHUB_OUTPUT
echo "image-name=$IMAGE_NAME" >> $GITHUB_OUTPUT
echo "image-path=$IMAGE_PATH" >> $GITHUB_OUTPUT
android-sdk-base:
name: Publish Android SDK base image
needs: env
uses: ./.github/workflows/publish-image.yml
with:
image-name: ${{ needs.env.outputs.image-name }}
context: android-sdk
target: base
platforms: linux/amd64,linux/arm64
title: Android SDK base image
tags: |
base
base-{{date 'YYYYMMDD'}}
android-sdk:
name: Publish Android SDK image
needs: [ android-sdk-base, env ]
strategy:
matrix:
sdk: [ 32, 33, 34 ]
uses: ./.github/workflows/publish-image.yml
with:
image-name: ${{ needs.env.outputs.image-name }}
target: sdk
platforms: linux/amd64,linux/arm64
title: Android SDK ${{ matrix.sdk }} image
tags: |
${{ matrix.sdk }}
${{ matrix.sdk }}-{{date 'YYYYMMDD'}}
build-args: |
base_image=${{ needs.env.outputs.image-path }}:base
sdk=${{ matrix.sdk }}
android-sdk-ndk:
name: Publish Android SDK image with NDK
needs: [ android-sdk, env ]
strategy:
matrix:
sdk: [ 32, 33, 34 ]
uses: ./.github/workflows/publish-image.yml
with:
image-name: ${{ needs.env.outputs.image-name }}
target: ndk
platforms: linux/amd64,linux/arm64
title: Android SDK ${{ matrix.sdk }} image with NDK ${{ needs.env.outputs.ndk }}
tags: |
${{ matrix.sdk }}-ndk
${{ matrix.sdk }}-ndk-${{ needs.env.outputs.ndk }}
${{ matrix.sdk }}-ndk-${{ needs.env.outputs.ndk }}-{{date 'YYYYMMDD'}}
build-args: |
sdk_image=${{ needs.env.outputs.image-path }}:${{ matrix.sdk }}
ndk=${{ needs.env.outputs.ndk }}