name: build on: push: branches: [main] pull_request: branches: [main] jobs: assemble-debug: name: Assemble debug APK runs-on: ubuntu-latest steps: # Checkout: clone the repo directly instead of actions/checkout - name: Checkout run: | git clone https://git.trevena.info/nick/incido.git repo cd repo # Set up JDK 17: download and extract directly (no apt-get, no root needed) - name: Set up JDK 17 run: | wget -q 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.13%2B11/OpenJDK17U-jdk_x64_linux_hotspot_17.0.13_11.tar.gz' -O /tmp/jdk.tar.gz mkdir -p /home/gitea/jdk tar -xzf /tmp/jdk.tar.gz -C /home/gitea/jdk --strip-components=1 rm /tmp/jdk.tar.gz echo "JAVA_HOME=/home/gitea/jdk" >> $GITHUB_ENV echo "PATH=/home/gitea/jdk/bin:$PATH" >> $GITHUB_ENV - name: Grant execute permission for gradlew run: chmod +x repo/gradlew - name: Cache Gradle packages run: | mkdir -p ~/.gradle/caches ~/.gradle/wrapper # Copy cached gradle wrapper if available if [ -d .github/workflows/gradle-cache ]; then cp -r .github/workflows/gradle-cache/* ~/.gradle/ 2>/dev/null || true fi - name: Build debug APK run: cd repo && ./gradlew assembleDebug # Note: artifact upload requires Docker or Gitea's native actions # Skipping artifact upload — download APK from runner workspace if needed