-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (37 loc) · 1.12 KB
/
ci_test.yml
File metadata and controls
44 lines (37 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI Parent Pipeline
on:
push:
branches: ["ci_test"]
pull_request:
branches: ["ci_test"]
workflow_dispatch:
jobs:
prepare:
name: Generate matrix from config
runs-on: ubuntu-latest
outputs:
matrix_json: ${{ steps.generate.outputs.matrix_json }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install converter dependency
run: pip install pyyaml
- name: Convert .ci/config.yaml to matrix JSON
id: generate
run: |
matrix_json="$(python .ci/scripts/config_to_matrix.py --config .ci/config.yaml)"
echo "matrix_json<<EOF" >> "$GITHUB_OUTPUT"
echo "$matrix_json" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Show generated matrix
run: echo '${{ steps.generate.outputs.matrix_json }}'
run-child:
name: Execute child pipeline
needs: prepare
uses: ./.github/workflows/ci_child.yml
with:
matrix_json: ${{ needs.prepare.outputs.matrix_json }}