ci: Gitea-native workflow (no GitHub actions API)
build / Assemble debug APK (push) Failing after 6s
build / Assemble debug APK (push) Failing after 6s
This commit is contained in:
1 parent
14d61c78d3
commit
5f46579a66
1 file changed
+22
-23
+22
-23
@@ -11,36 +11,35 @@ jobs:
|
||||
name: Assemble debug APK
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout: clone the repo directly instead of actions/checkout
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
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
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 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 gradlew
|
||||
run: chmod +x repo/gradlew
|
||||
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
${{ runner.os }}-
|
||||
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: ./gradlew assembleDebug
|
||||
run: cd repo && ./gradlew assembleDebug
|
||||
|
||||
- name: Upload APK as artefact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: incido-debug-apk
|
||||
path: app/build/outputs/apk/debug/app-debug.apk
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
# Note: artifact upload requires Docker or Gitea's native actions
|
||||
# Skipping artifact upload — download APK from runner workspace if needed
|
||||
Reference in new issue
Block a user