automatic discovery

This commit is contained in:
Osman Faruk Bayram 2025-10-24 09:46:46 +03:00
parent 78fe6eb4d2
commit 4df1db4dbf

View file

@ -5,13 +5,27 @@ on:
- cron: '0 0 * * *' # Every day at midnight UTC - cron: '0 0 * * *' # Every day at midnight UTC
push: push:
jobs: jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate app matrix
id: set-matrix
run: |
# Get all app names from apks directory structure
apps=$(find apks -mindepth 2 -maxdepth 2 -type d | sed 's|apks/[^/]*/||' | sort | jq -R -s -c 'split("\n")[:-1]')
echo "matrix={\"app-name\":$apps}" >> $GITHUB_OUTPUT
build-app: build-app:
# use a matrix of (app, system, runner) so we build the appropriate needs: generate-matrix
# flake output for the runner OS. this runs 4 jobs: two apps x two systems.
strategy: strategy:
matrix: matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
app-name: [smouldering_durtles, mihon]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout