-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (43 loc) · 1.46 KB
/
example-empty.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
47
48
49
50
51
52
53
54
55
56
name: example-empty
on:
pull_request:
types: [edited, opened, synchronize, reopened]
branches: [master]
jobs:
pr-changes:
runs-on: ubuntu-latest
outputs:
matrix-params: ${{ steps.matrix-builder.outputs.matrix }}
matrix-populated: ${{ steps.matrix-builder.outputs.matrix-populated }}
steps:
- uses: actions/checkout@v2
- uses: ./
id: matrix-builder
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repo: KyleJamesWalker/action-playground
pr_number: 3
default_params: '{"foo": "bar", "baz": "qux"}'
inject_primary_key: project_name
inject_params: '{"example_1": {"bean": True}}'
extract_re: '(?P<project_name>.*)/.*'
paths_ignore: '["**"]'
echo-params:
needs: [pr-changes]
runs-on: ubuntu-latest
steps:
- name: Echo matrix-params outputs
run: echo ${{ needs.pr-changes.outputs.matrix-params }}
- name: Echo matrix-populated outputs
run: echo ${{ needs.pr-changes.outputs.matrix-populated }}
matrix-params:
needs: [pr-changes]
if: needs.pr-changes.outputs.matrix-populated == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
params: ${{ fromJson(needs.pr-changes.outputs.matrix-params ) }}
steps:
- name: Echo params
run: |
echo "${{ matrix.params.project_name }} - ${{ matrix.params.foo }}, ${{ matrix.params.baz }}, ${{ matrix.params.beans }}"