Skip to content

Commit 71900c6

Browse files
committed
Add a special case _all_ for changes-override to trigger everything
1 parent 3353116 commit 71900c6

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ inputs:
2525
description: Path to the filter file
2626
required: true
2727
changes-override:
28-
description: Override the changes filter and provide your own set of paths (comma separated)
28+
description: |
29+
Override the changes filter and provide your own set of paths (comma separated). If you
30+
provide the magic value `_all_`, it'll use all the paths from the filter file.
2931
required: false
3032
default-key:
3133
description: Default key (fallback value if no key is provided for a path)

action.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ inputs:
99
description: Path to the filter file
1010
required: true
1111
changes-override:
12-
description: Override the changes filter and provide your own set of paths (comma separated)
12+
description: |
13+
Override the changes filter and provide your own set of paths (comma separated). If you
14+
provide the magic value `_all_`, it'll use all the paths from the filter file.
1315
required: false
1416
default-key:
1517
description: Default key (fallback value if no key is provided for a path)
@@ -37,7 +39,15 @@ runs:
3739
with:
3840
filters: ${{ inputs.filter-file }}
3941
- name: Collect changes
40-
if: "${{ inputs.changes-override != '' }}"
42+
if: "${{ inputs.changes-override == '_all_' }}"
43+
id: all
44+
shell: bash
45+
run: |
46+
echo "changes=`yq -o json '
47+
keys |
48+
map(. | sub("[\\w\\-_]*\\|", ""))
49+
' ${{ inputs.filter-file }} | jq -c`" >> "$GITHUB_OUTPUT"
50+
- name: Collect changes
4151
id: custom
4252
shell: bash
4353
run: |
@@ -48,7 +58,7 @@ runs:
4858
id: matrix-generator
4959
shell: bash
5060
run: |
51-
CHANGED_PATHS='${{ steps.custom.outputs.changes || steps.filtered.outputs.changes }}'
61+
CHANGED_PATHS='${{ steps.filtered.outputs.changes || steps.all.outputs.changes || steps.custom.outputs.changes }}'
5262
5363
# Convert our filters file into a lookup map, so we can map a path to
5464
# a key. Then map each change entry to it's corresponding key and

0 commit comments

Comments
 (0)