generated from qoomon/actions--template
-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (43 loc) · 2.69 KB
/
matrix-example.yaml
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
45
46
name: Example Matrix Action
on:
push:
branches: ['main']
workflow_dispatch:
jobs:
build-with-reusable-workflow-with-matrix-inputs:
strategy:
fail-fast: false
matrix:
inputs: [
{id: '1.1', input_1: 'In_this_input_we_are_testing_very_very_very_long_strings', input_2: 'In_this_input_we_are_testing_very_very_very_long_strings'},
{id: '1.1', input_1: 'In_this_input_we_are_testing_very_very_very_long_strings', input_2: 'In_this_input_we_are_testing_very_very_very_long_strings'},
{id: '1.1', input_1: 'In_this_input_we_are_testing_very_very_very_long_strings', input_2: 'In_this_input_we_are_testing_very_very_very_long_string'},
{id: '1.2', input_1: 'Example', input_2: 'In_this_input_we_are_testing_very_very_very_long_strings'},
{id: '1.3', input_2: 'In_this_input_we_are_testing_very_very_very_long_strings'},]
uses: ./.github/workflows/example-reusable-from-matrix.yml
with:
id: ${{matrix.inputs.id}} # Id to seperate the different runs
input_2: ${{matrix.inputs.input_2}}
input_1: ${{matrix.inputs.input_1}}
workflow-context: build-with-reusable-workflow-with-matrix-inputs, ${{ toJSON(matrix) }}
build-with-reusable-workflow-with-limit:
strategy:
max-parallel: 2
fail-fast: false
matrix:
inputs: [
{id: '2.1', input_1: 'In_this_input_we_are_testing_very_very_very_long_strings', input_2: 'In_this_input_we_are_testing_very_very_very_long_strings'},
{id: '2.1', input_1: 'In_this_input_we_are_testing_very_very_very_long_strings', input_2: 'In_this_input_we_are_testing_very_very_very_long_strings'},
{id: '2.1', input_1: 'In_this_input_we_are_testing_very_very_very_long_strings', input_2: 'In_this_input_we_are_testing_very_very_very_long_string'},
{id: '2.2', input_1: 'Example', input_2: 'In_this_input_we_are_testing_very_very_very_long_strings'},
{id: '2.3', input_1: 'In_this_input_we_are_testing_very_very_very_long_strings'},
{id: '2.4', input_1: 'In_this_test_we_are_testing', input_2: 'the_character_sm_of_98'},
{id: '2.5', input_1: 'In_this_test_we_are_testing', input_2: 'the_character_sum_of_99'},
{id: '2.6', input_1: 'In_this_test_we_are_testing', input_2: 'the_character_sum_of_100'},
{id: '2.7', input_1: 'In_this_test_we_are_testing', input_2: 'the_character_sum_of_101_'}]
uses: ./.github/workflows/example-reusable-from-matrix.yml
with:
id: ${{matrix.inputs.id}} # Id to seperate the different runs
input_2: ${{matrix.inputs.input_2}}
input_1: ${{matrix.inputs.input_1}}
workflow-context: build-with-reusable-workflow-with-limit, ${{ toJSON(matrix) }}