Skip to content

Update main-dynamic-matrix.yaml #6

Update main-dynamic-matrix.yaml

Update main-dynamic-matrix.yaml #6

name: Dynamic matrix demo
on:
push:
workflow_dispatch:
jobs:
build-matrix:
runs-on: ubuntu-latest
steps:
# Checkout repo
- uses: actions/checkout@v2
# Setup python
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Run script to generate matrix
id: generate-matrix
run: |
python3 scripts/generate-matrix.py
outputs:
matrix: ${{ steps.generate-matrix.outputs.dynamic_list }}
build:
runs-on: ubuntu-latest
needs: ["build-matrix"]
strategy:
matrix:
number: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
steps:
- run: |
echo ${{ matrix.number }}
# for i in {1..${{ matrix.number}}}; do
# echo "Hello $i"
# done