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
|
name: Assemble debug APK
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
# Checkout: clone the repo directly instead of actions/checkout
|
||||||
- name: 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
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v4
|
run: |
|
||||||
with:
|
apt-get update -qq
|
||||||
distribution: temurin
|
apt-get install -y -qq openjdk-17-jdk > /dev/null 2>&1
|
||||||
java-version: 17
|
echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for gradlew
|
||||||
run: chmod +x gradlew
|
run: chmod +x repo/gradlew
|
||||||
|
|
||||||
- name: Cache Gradle packages
|
- name: Cache Gradle packages
|
||||||
uses: actions/cache@v4
|
run: |
|
||||||
with:
|
mkdir -p ~/.gradle/caches ~/.gradle/wrapper
|
||||||
path: |
|
# Copy cached gradle wrapper if available
|
||||||
~/.gradle/caches
|
if [ -d .github/workflows/gradle-cache ]; then
|
||||||
~/.gradle/wrapper
|
cp -r .github/workflows/gradle-cache/* ~/.gradle/ 2>/dev/null || true
|
||||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
fi
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-gradle-
|
|
||||||
${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Build debug APK
|
- name: Build debug APK
|
||||||
run: ./gradlew assembleDebug
|
run: cd repo && ./gradlew assembleDebug
|
||||||
|
|
||||||
- name: Upload APK as artefact
|
# Note: artifact upload requires Docker or Gitea's native actions
|
||||||
uses: actions/upload-artifact@v4
|
# Skipping artifact upload — download APK from runner workspace if needed
|
||||||
with:
|
|
||||||
name: incido-debug-apk
|
|
||||||
path: app/build/outputs/apk/debug/app-debug.apk
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 14
|
|
||||||
Reference in new issue
Block a user