Skip to content

add app matrix to CI #6

add app matrix to CI

add app matrix to CI #6

Workflow file for this run

---
name: main
on:
push:
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
env:
- RUNS_ON: ubuntu-24.04

Check failure on line 14 in .github/workflows/main.yaml

View workflow run for this annotation

GitHub Actions / main

Invalid workflow file

The workflow is not valid. .github/workflows/main.yaml (Line: 14, Col: 1): A sequence was not expected .github/workflows/main.yaml (Line: 18, Col: 14): Unrecognized named-value: 'env'. Located at position 1 within expression: env.RUNS_ON
jobs:
init:
runs-on: ${{ env.RUNS_ON }}
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: ${{ env.RUNS_ON }}
needs: init
strategy:
matrix:
apps: ${{ fromJSON(needs.init.outputs.apps) }}
steps:
- name: Checkout repo
uses: actions/checkout@v4