mirror of
https://github.com/izzy2lost/docker-android.git
synced 2026-06-19 01:16:28 -07:00
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: Build APK with Valid Docker Tag
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
arch: [armv7, arm64] # armv7 uses Houdini; arm64 uses native emulator
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Start Android emulator
|
|
uses: docker://budtmo/docker-android:emulator_13.0
|
|
with:
|
|
args: >
|
|
-e EMULATOR_DEVICE="Samsung Galaxy S10" # Device from README example
|
|
-e EMULATOR_ARGS="-no-window -no-audio -no-boot-anim"
|
|
-e ARCH=${{ matrix.arch }}
|
|
-v ${{ github.workspace }}:/root/workspace
|
|
|
|
- name: Install Termux and build APK
|
|
run: |
|
|
# Install Termux
|
|
curl -L -o termux.apk "https://f-droid.org/repo/com.termux_$(curl -s https://api.github.com/repos/termux/termux-app/releases/latest | grep -oP '"tag_name": "\K[^"]+').apk"
|
|
adb install termux.apk
|
|
|
|
# Run your build script
|
|
adb push myscript.sh /data/data/com.termux/files/home/
|
|
adb shell "chmod +x /data/data/com.termux/files/home/myscript.sh"
|
|
adb shell "cd /data/data/com.termux/files/home && ./myscript.sh"
|
|
|
|
- name: Upload APK artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: sm64coopdx-${{ matrix.arch }}
|
|
path: sm64coopdx-${{ matrix.arch }}.apk
|