Files
Incido/.gitea/workflows/build.yml
T
2026-08-20 02:09:45 +12:00

46 lines
1.4 KiB
YAML

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 --depth 1 https://git.trevena.info/nick/incido.git repo
cd repo
# Fetch full history for gradle
git fetch --depth=0 origin main
git checkout main
# Set up JDK 17 via apt instead of actions/setup-java
- name: Set up JDK 17
run: |
apt-get update -qq
apt-get install -y -qq openjdk-17-jdk > /dev/null 2>&1
echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $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