-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (76 loc) · 2.47 KB
/
android-sdk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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 }}