From b7ee0523d1a77e8296e4aa41346cfaf8d2d4944f Mon Sep 17 00:00:00 2001 From: be-nj Date: Wed, 26 Aug 2026 03:10:43 +0200 Subject: [PATCH] CI: build without marketplace actions The runner resolves bare action names against this Gitea, and even with full GitHub URLs it fails on annotated tags (unsupported object type). The image also ships neither a JDK nor an Android SDK, so the job never had a chance. Everything is plain shell now: shallow checkout, JDK 17, command-line SDK tools, tests, debug APK. Co-Authored-By: Claude Fable 5 --- .github/workflows/build.yml | 55 +++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d228a39..ec96131 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,36 +4,49 @@ on: push: workflow_dispatch: +# No marketplace actions: this Gitea runner resolves bare action names +# against the local instance, and even with full URLs it cannot resolve +# annotated tags ("unsupported object type"). Everything below is plain +# shell, which also keeps the job readable. jobs: build: runs-on: ubuntu-latest + env: + ANDROID_SDK_ROOT: /opt/android-sdk + CMDLINE_TOOLS: https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip steps: - # Full URLs: this Gitea resolves bare action names against itself, - # where these actions do not exist. - - uses: https://github.com/actions/checkout@v4 + - name: Checkout + run: | + git init -q . + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git fetch -q --depth 1 origin "${GITHUB_SHA}" + git checkout -q FETCH_HEAD - - uses: https://github.com/actions/setup-java@v4 - with: - distribution: temurin - java-version: "17" + - name: Install JDK + run: | + apt-get update -qq + DEBIAN_FRONTEND=noninteractive apt-get install -y -qq openjdk-17-jdk-headless > /dev/null + java -version - - uses: https://github.com/gradle/actions/setup-gradle@v4 + - name: Install Android SDK + run: | + mkdir -p "$ANDROID_SDK_ROOT/cmdline-tools" + curl -sSL -o /tmp/tools.zip "$CMDLINE_TOOLS" + unzip -q /tmp/tools.zip -d "$ANDROID_SDK_ROOT/cmdline-tools" + mv "$ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools" "$ANDROID_SDK_ROOT/cmdline-tools/latest" + yes | "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null + "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" \ + "platforms;android-35" "build-tools;35.0.0" "platform-tools" > /dev/null + echo "sdk.dir=$ANDROID_SDK_ROOT" > local.properties - name: Unit tests - run: ./gradlew testDebugUnitTest --stacktrace + run: ./gradlew testDebugUnitTest --no-daemon --stacktrace - name: Build debug APK - run: ./gradlew assembleDebug --stacktrace + run: ./gradlew assembleDebug --no-daemon --stacktrace - - name: Upload APK - uses: https://github.com/actions/upload-artifact@v4 - with: - name: castarr-debug-apk - path: app/build/outputs/apk/debug/app-debug.apk - - - name: Upload test report + - name: Summary if: always() - uses: https://github.com/actions/upload-artifact@v4 - with: - name: castarr-test-report - path: tests/runs/ + run: | + echo "APK:"; ls -la app/build/outputs/apk/debug/ 2>/dev/null || echo " (kein Build)" + echo "Tests:"; ls tests/runs/junit/ 2>/dev/null || echo " (keine Reports)"