-
Notifications
You must be signed in to change notification settings - Fork 102
40 lines (37 loc) · 1.11 KB
/
65-sequential-matrix.yml
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
name: 65 - Sequential Matrix
on:
workflow_dispatch:
jobs:
orchestration:
runs-on: ubuntu-latest
outputs:
tasks: ${{ steps.tasks.outputs.tasks }}
steps:
- name: Build Tasks Array
id: tasks
run: |
myArray=()
myArray+=("task1")
myArray+=("task2")
myArray+=("task3")
myArray=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${myArray[@]}")
echo "Updated tasks list: $myArray"
echo "tasks=$myArray" >> $GITHUB_OUTPUT
shell: bash
deploy:
runs-on: ubuntu-latest
needs: [orchestration]
strategy:
matrix:
stage: ${{ fromJSON(needs.orchestration.outputs.tasks) }}
fail-fast: true
max-parallel: 1
# set the environment to use (environment must exist and be named the same as the stage here)
# environment:
# name: ${{ matrix.stage }}
steps:
# use environment specific secrets here for each stage
- name: Execute task ${{ matrix.stage }}
run: |
echo "Perform job executing task ${{ matrix.stage }}"
sleep 60