-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.27 KB
/
main.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Parse String
on:
workflow_dispatch:
inputs:
value:
description: 'String Input'
required: true
jobs:
parse-input:
runs-on: ubuntu-latest
name: Parsing input value
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Parse inputs
id: parse
uses: ./
with:
value: ${{ github.event.inputs.value }}
run-all-default-values: 'run,all,ko,example'
- name: Print parsed value
run: echo "Parsed value is ${{ steps.parse.outputs.parsed }}"
outputs:
parsed: ${{ steps.parse.outputs.parsed }}
is-empty: ${{ steps.parse.outputs.is-empty }}
matrix-example:
needs: parse-input
if : ${{ needs.parse-input.outputs.is-empty == 'false' }}
runs-on: ubuntu-latest
strategy:
matrix:
input: ${{ fromJson(needs.parse-input.outputs.parsed) }}
name: Matrix example
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Print value
run: echo "Value is ${{ matrix.input }}"