Skip to content

run nativeful and nativeless builds #4

run nativeful and nativeless builds

run nativeful and nativeless builds #4

---
name: Android - Reprodubile
on:
workflow_dispatch:
inputs:
override_container_image:
description: Override container image
type: string
required: false
push:
branches: [wip-reproducible-action]
jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use custom container image if specified
if: ${{ github.event.inputs.override_container_image != '' }}
run: echo "inner_container_image=${{ github.event.inputs.override_container_image }}"
>> $GITHUB_ENV
- name: Use default container image and resolve digest
if: ${{ github.event.inputs.override_container_image == '' }}
run: |
echo "inner_container_image=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV
outputs:
container_image: ${{ env.inner_container_image }}
build-nativeful:
name: Reproducible nativeful build
needs: [prepare]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ${{ needs.prepare.outputs.container_image }}
strategy:
fail-fast: true
matrix:
build-id: [a, b]
steps:
- name: Fix HOME path
run: echo "HOME=/root" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Build nativeful app (${{ matrix.build-id }})
run: |
git config --global --add safe.directory $(pwd)
./build-apk.sh --fdroid
- name: Upload apks (${{ matrix.build-id }})
uses: actions/upload-artifact@v3
with:
name: apk-nativeful-${{ matrix.build-id }}
path: dist
if-no-files-found: error
retention-days: 7
build-nativeless:
name: Reproducible nativeless build
needs: [prepare]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ${{ needs.prepare.outputs.container_image }}
strategy:
fail-fast: false
matrix:
build-id: [a, b]
steps:
- name: Fix HOME path
run: echo "HOME=/root" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Build app (${{ matrix.build-id }})
run: |
git config --global --add safe.directory $(pwd)
./android/gradlew -p android clean assembleOssProdFdroid
- name: Upload apks (${{ matrix.build-id }})
uses: actions/upload-artifact@v3
with:
name: apk-nativeless-${{ matrix.build-id }}
path: android/app/build/outputs/apk
if-no-files-found: error
retention-days: 7