Skip to content

fix indentation

fix indentation #2

Workflow file for this run

name: Aggregated CI Status

Check failure on line 1 in .github/workflows/aggregator.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/aggregator.yml

Invalid workflow file

(Line: 15, Col: 12): Unrecognized named-value: 'inputs'. Located at position 10 within expression: fromJson(inputs.jobs), (Line: 18, Col: 14): Unexpected symbol: '.result'. Located at position 13 within expression: needs.'$job'.result
on:
workflow_call:
inputs:
jobs:
description: "List of job names to aggregate"
required: true
type: string
jobs:
aggregator:
name: Aggregated CI Status
runs-on: ubuntu-latest
if: ${{ always() }}
needs: ${{ fromJson(inputs.jobs) }}
steps:
- name: Aggregate results
run: |
failed=()
for job in ${{ inputs.jobs }}; do
result=$(eval echo '${{ needs.'$job'.result }}')
if [ "$result" != "success" ]; then
failed+=("$job")
fi
done
if [ ${#failed[@]} -ne 0 ]; then
echo "❌ Failed jobs: ${failed[*]}"
exit 1
fi
echo "✅ All required jobs succeeded"