-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 990 Bytes
/
dynamic-jobs.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
name: dynamic job gneration
on:
pull_request:
paths:
- dynamic-jobs/**
jobs:
changes:
runs-on: ubuntu-latest
outputs:
folders: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
# https://github.com/tj-actions/changed-files
# This action support number of output options
- name: Changed file list
uses: tj-actions/changed-files@v45
id: changed-files
with:
dir_names: true
dir_names_max_depth: 2
json: true
matrix: true
files: |
dynamic-jobs/**
execution:
name: "Execution"
needs: [changes]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
folder: ${{ fromJSON(needs.changes.outputs.folders) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Execute
run: ${{ matrix.folder }}/runner.sh