From a329257054f2702f72c00b6de1dfea27659c5f24 Mon Sep 17 00:00:00 2001 From: Ruairidh MacLeod Date: Mon, 9 Dec 2024 10:37:57 +0000 Subject: [PATCH] add app matrix to CI --- .github/workflows/main.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 2c88a6d..a2a53a8 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -11,8 +11,25 @@ defaults: shell: bash jobs: + init: + runs-on: ubuntu-24.04 + outputs: + apps: ${{ steps.apps.outputs.apps }} + steps: + - name: checkout + uses: actions/checkout@v4 + - name: set app matrix + id: apps + run: | + set -euxo pipefail + apps=$(find . -name Dockerfile | xargs dirname | cut -d'/' -f2 | sort | jq -ncR '[inputs]') + echo "apps=$apps" >> "$GITHUB_OUTPUT" build: runs-on: ubuntu-24.04 + needs: init + strategy: + matrix: + apps: ${{ fromJSON(needs.init.outputs.apps) }} steps: - name: Checkout repo uses: actions/checkout@v4