-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 926 Bytes
/
Copy pathlearn-github-actions.yml
File metadata and controls
31 lines (29 loc) · 926 Bytes
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
name: learn-github-actions
run-name: ${{ github.actor }} is learning GitHub Actions
on: [pull_request]
jobs:
loadFeatures:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- id: set-matrix
name: set JSON
run: echo "matrix={\"features\":[$(for i in $(find ./features -type f -name "*.feature");do echo -n " \"$i\","; done;)]}" >> "$GITHUB_OUTPUT"
- name: Test
run: echo ${{ steps.set-matrix.outputs.matrix }}
manually-approved:
needs: loadFeatures
runs-on: ubuntu-latest
environment:
name: int
steps:
- run: echo "This stage need be approved manually"
execute-test-specification:
needs: manually-approved
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.loadFeatures.outputs.matrix) }}
steps:
- run: echo ${{ matrix.features }}