-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathaction.yml
46 lines (44 loc) · 1.45 KB
/
action.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
name: Neo
description: Generate a matrix depending on changed files
inputs:
pattern:
description: regex pattern with named groups to match against changed files
required: true
defaults:
description: when set to true, if changed files don't match the pattern, recursively match all files in the repository.
default: "false"
required: false
default-patterns:
description: line separated list of UNIX-style glob patterns matched against the list of changed files. if match, switch to defaults mode.
default: ""
required: false
ignore-deleted-files:
description: whether to ignore the deleted files or not
deprecationMessage: not used anymore
default: "false"
required: false
outputs:
matrix:
description: the output job matrix
value: ${{ steps.neo.outputs.matrix }}
matrix-length:
description: the length of the matrix
value: ${{ steps.neo.outputs.matrix-length }}
runs:
using: composite
steps:
# required to compare the pattern on the files in the repo
- if: inputs.defaults || inputs.default-patterns != ''
uses: actions/checkout@v4
- id: neo
shell: bash
env:
GITHUB_TOKEN: ${{ github.token }}
DEFAULT_PATTERNS: ${{ inputs.default-patterns }}
run: |
${{ github.action_path }}/neo/neo.py \
--pattern "${{ inputs.pattern }}" \
--defaults=${{inputs.defaults}} >> $GITHUB_OUTPUT
branding:
icon: git-pull-request
color: green