Files
apk/.gitea/workflows/build_arch.yml
anorien90 a38893f5a3
Some checks failed
Test setup and build APKs archlinux / Build-APK-Arch-Linux (push) Failing after 9m48s
Test setup and build APKs / Build-and-Create-Development-Environment (push) Successful in 12s
updated java version
2025-12-10 11:59:06 +01:00

58 lines
1.7 KiB
YAML

name: Test setup and build APKs archlinux
run-name: ${{ gitea.actor }} is building APKs for ${{ gitea.repository }}
on: [push]
branches:
- master
jobs:
Build-APK-Arch-Linux: # Renamed job for clarity
runs-on: archlinux
container:
volumes:
- /prod/data/apk/:/prod/data/apk/:rw # host_path:container_path:mode (rw or ro)
steps:
- name: Install base dependencies
run: |
pacman -Syu --noconfirm git base-devel curl jq wget nodejs npm
- name: Fetch and run act_runner setup script
run: |
git clone https://gist.github.com/c7672ecd2ef5d96ebd09ccd13a668a91.git /opt/act_runner
chmod +x /opt/act_runner/install.sh
/opt/act_runner/install.sh
- name: Check out Repository
uses: actions/checkout@v4
- name: Start repository setup process
run: |
./setup.sh
- name: Build APKs debug
run: |
./build.sh
- name: Build APKs release
run: |
find . -name "build" -type d -exec rm -rf {} +
rm -rf ~/.gradle/caches/
rm -rf /workspace/Fast/apk/src/**/app/build/kotlin
./build.sh clean
- name: Copy APKs to host directory
run: |
export APKS=$(find src -type f -name "*.apk")
echo "Found APKs: $APKS"
export APK_DIRS=$(dirname $APKS | sort -u)
for dir in $APK_DIRS; do
# We only need the first and last part of the path
# e.g., src/FastAdmin/app/build/outputs/apk/release -> FastAdmin/release
pkg_dir=$(echo $dir | awk -F'/' '{print $2 "/" $NF}')
mkdir -p /prod/data/apk/$pkg_dir
cp $dir/*.apk /prod/data/apk/$pkg_dir/
done