diff --git a/.github/workflows/check-sdk-updates.yml b/.github/workflows/check-sdk-updates.yml index fd3826b..ba0d8c6 100644 --- a/.github/workflows/check-sdk-updates.yml +++ b/.github/workflows/check-sdk-updates.yml @@ -107,8 +107,9 @@ jobs: # are listed too), which then break the unattended Docker build when # sdkmanager demands the separate Android SDK Preview license. The manifest # carries reliable preview markers, so we parse it with a real XML parser - # and skip any package that is obsolete, carries a element, or - # uses the android-sdk-preview-license. + # and skip any package that is obsolete, carries a non-empty , or + # uses the android-sdk-preview-license. Stable platforms since android-37.0 + # carry an EMPTY , so only a non-empty one marks a preview. if ! wget -q "https://dl.google.com/android/repository/repository2-3.xml" -O /tmp/android-repo.xml; then echo "Failed to download SDK repository manifest" echo "updated=false" >> $GITHUB_OUTPUT @@ -126,7 +127,7 @@ jobs: if pkg.get('obsolete') == 'true': return True for e in pkg.iter(): - if local(e.tag) == 'codename': + if local(e.tag) == 'codename' and (e.text or '').strip(): return True if local(e.tag) == 'uses-license' and e.get('ref') == 'android-sdk-preview-license': return True diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 18ee23c..53aa0ec 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -53,8 +53,10 @@ jobs: RUNNER_TAG=$(grep -m1 '^ARG VERSION=' Dockerfile | cut -d= -f2) RUNNER_VERSION=$(echo "$RUNNER_TAG" | cut -d- -f1) COMPILE_SDK=$(grep -m1 '^ARG COMPILE_SDK=' Dockerfile | cut -d= -f2) + BUILD_TOOLS=$(grep -m1 '^ARG BUILD_TOOLS=' Dockerfile | cut -d= -f2) + NDK_VERSION=$(grep -m1 '^ARG NDK_VERSION=' Dockerfile | cut -d= -f2) - if [ -z "$RUNNER_TAG" ] || [ -z "$RUNNER_VERSION" ] || [ -z "$COMPILE_SDK" ]; then + if [ -z "$RUNNER_TAG" ] || [ -z "$RUNNER_VERSION" ] || [ -z "$COMPILE_SDK" ] || [ -z "$BUILD_TOOLS" ] || [ -z "$NDK_VERSION" ]; then echo "::error::Failed to extract versions from Dockerfile" exit 1 fi @@ -62,6 +64,8 @@ jobs: echo "runner_tag=${RUNNER_TAG}" >> $GITHUB_OUTPUT echo "runner_version=${RUNNER_VERSION}" >> $GITHUB_OUTPUT echo "compile_sdk=${COMPILE_SDK}" >> $GITHUB_OUTPUT + echo "build_tools=${BUILD_TOOLS}" >> $GITHUB_OUTPUT + echo "ndk_version=${NDK_VERSION}" >> $GITHUB_OUTPUT - name: Login to GitHub Container Registry uses: docker/login-action@v4 @@ -136,14 +140,18 @@ jobs: RUNNER_TAG=$(grep -m1 '^ARG VERSION=' Dockerfile | cut -d= -f2) RUNNER_VERSION=$(echo "$RUNNER_TAG" | cut -d- -f1) COMPILE_SDK=$(grep -m1 '^ARG COMPILE_SDK=' Dockerfile | cut -d= -f2) + BUILD_TOOLS=$(grep -m1 '^ARG BUILD_TOOLS=' Dockerfile | cut -d= -f2) + NDK_VERSION=$(grep -m1 '^ARG NDK_VERSION=' Dockerfile | cut -d= -f2) - if [ -z "$RUNNER_TAG" ] || [ -z "$RUNNER_VERSION" ] || [ -z "$COMPILE_SDK" ]; then + if [ -z "$RUNNER_TAG" ] || [ -z "$RUNNER_VERSION" ] || [ -z "$COMPILE_SDK" ] || [ -z "$BUILD_TOOLS" ] || [ -z "$NDK_VERSION" ]; then echo "::error::Failed to extract versions from Dockerfile" exit 1 fi echo "runner_version=${RUNNER_VERSION}" >> $GITHUB_OUTPUT echo "compile_sdk=${COMPILE_SDK}" >> $GITHUB_OUTPUT + echo "build_tools=${BUILD_TOOLS}" >> $GITHUB_OUTPUT + echo "ndk_version=${NDK_VERSION}" >> $GITHUB_OUTPUT - name: Download digests uses: actions/download-artifact@v8 @@ -172,6 +180,13 @@ jobs: type=raw,value=node${{ matrix.node_version }},enable=${{ matrix.is_default_jdk }} type=raw,value=jdk${{ matrix.java_version }}-node${{ matrix.node_version }} type=raw,value=${{ steps.versions.outputs.runner_version }}-jdk${{ matrix.java_version }}-sdk${{ steps.versions.outputs.compile_sdk }}-node${{ matrix.node_version }} + # Same image, with the NDK it ships in the tag: consumers that pin an NDK (Android + # Gradle ndkVersion) can let Renovate derive it from this tag so image and NDK move together. + type=raw,value=${{ steps.versions.outputs.runner_version }}-jdk${{ matrix.java_version }}-sdk${{ steps.versions.outputs.compile_sdk }}-ndk${{ steps.versions.outputs.ndk_version }}-node${{ matrix.node_version }} + # Same image, with every Gradle-pinnable SDK component in the tag (compileSdk, build-tools, + # NDK), so consumers can let Renovate derive all three from one tag. The -sdk-ndk tag above + # stays for consumers already parsing it. + type=raw,value=${{ steps.versions.outputs.runner_version }}-jdk${{ matrix.java_version }}-sdk${{ steps.versions.outputs.compile_sdk }}-bt${{ steps.versions.outputs.build_tools }}-ndk${{ steps.versions.outputs.ndk_version }}-node${{ matrix.node_version }} type=raw,value=latest,enable=${{ matrix.is_default_jdk && matrix.is_default_node }} - name: Create manifest list and push diff --git a/Dockerfile b/Dockerfile index d90f1a4..1a493e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG VERSION=2.338.0-ubuntu-noble ARG JAVA_VERSION=21 ARG NODE_VERSION=24 -ARG COMPILE_SDK=36.1 +ARG COMPILE_SDK=37.2 ARG BUILD_TOOLS=37.0.0 ARG NDK_VERSION=30.0.16248370 ARG SDK_TOOLS=8512546_latest diff --git a/README.md b/README.md index 24a7093..b32140d 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,13 @@ Images are published to `ghcr.io/dodi-smart/github-runner`. | `jdk21` | JDK major | | `node22` | Node major | | `jdk21-node22` | JDK and Node majors | -| `2.338.0-jdk21-sdk36-node24` | Everything: runner, JDK, SDK and Node. Never overwritten | +| `2.338.0-jdk21-sdk37.2-node24` | Everything: runner, JDK, SDK and Node. Never overwritten | +| `2.338.0-jdk21-sdk37.2-ndk30.0.16248370-node24` | Same image, NDK spelled out | +| `2.338.0-jdk21-sdk37.2-bt37.0.0-ndk30.0.16248370-node24` | Same image, build-tools and NDK spelled out | + +The longer tags let a consumer have Renovate derive its Gradle `compileSdk`, +`buildToolsVersion` and `ndkVersion` from the image pin, so AGP doesn't download +SDK components on every job. [`matrix.json`](matrix.json) lists the available JDK and Node versions and the defaults. Each image sets `RUNNER_IMAGE_TAG` and `RUNNER_IMAGE_REVISION`, so a