From 04c4b20822014228d6c26615b36b7e649d4c8a8d Mon Sep 17 00:00:00 2001 From: Mikkel Christensen Date: Wed, 12 Nov 2025 14:40:06 +0100 Subject: [PATCH 1/6] A more compact way of expressing (part of) a path filter. --- .github/workflows/paths-filtering-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/paths-filtering-tests.yml b/.github/workflows/paths-filtering-tests.yml index 74d56fd..a600225 100644 --- a/.github/workflows/paths-filtering-tests.yml +++ b/.github/workflows/paths-filtering-tests.yml @@ -23,6 +23,8 @@ jobs: - '!*' # Exclude changes to workflows in general - '!.github/workflows/**' + # Alternative representation of the sourceCode list: + sourceCode1: ['**'`, '!*', '!.github/workflows/**'] self: # Include changes to THIS workflow - '.github/workflows/paths-filtering-tests.yml' From f046de86518e1669d7adc1c5949c335446d617ed Mon Sep 17 00:00:00 2001 From: Mikkel Christensen Date: Wed, 12 Nov 2025 14:41:54 +0100 Subject: [PATCH 2/6] Removed an unexpected ` char. --- .github/workflows/paths-filtering-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paths-filtering-tests.yml b/.github/workflows/paths-filtering-tests.yml index a600225..15b6ef6 100644 --- a/.github/workflows/paths-filtering-tests.yml +++ b/.github/workflows/paths-filtering-tests.yml @@ -24,7 +24,7 @@ jobs: # Exclude changes to workflows in general - '!.github/workflows/**' # Alternative representation of the sourceCode list: - sourceCode1: ['**'`, '!*', '!.github/workflows/**'] + sourceCode1: ['**', '!*', '!.github/workflows/**'] self: # Include changes to THIS workflow - '.github/workflows/paths-filtering-tests.yml' From fb99b487a6792e7106156bcd69bbaaacc0de3395 Mon Sep 17 00:00:00 2001 From: Mikkel Christensen Date: Wed, 12 Nov 2025 15:13:40 +0100 Subject: [PATCH 3/6] Try with a file containing the sourceCode filter definition. --- .github/sharedPathFilter.yml | 4 ++++ .github/workflows/paths-filtering-tests.yml | 19 +++++++------------ 2 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 .github/sharedPathFilter.yml diff --git a/.github/sharedPathFilter.yml b/.github/sharedPathFilter.yml new file mode 100644 index 0000000..164b88f --- /dev/null +++ b/.github/sharedPathFilter.yml @@ -0,0 +1,4 @@ +sourceCode: + - '**' + - '!*' + - '!.github/workflows/**' \ No newline at end of file diff --git a/.github/workflows/paths-filtering-tests.yml b/.github/workflows/paths-filtering-tests.yml index 15b6ef6..1f2bfbd 100644 --- a/.github/workflows/paths-filtering-tests.yml +++ b/.github/workflows/paths-filtering-tests.yml @@ -11,26 +11,21 @@ jobs: permissions: pull-requests: read steps: - # For pull requests it's not necessary to checkout the code + - uses: actions/checkout@v5 - uses: dorny/paths-filter@v3 - id: filter + id: shared + with: + filters: .github/sharedPathFilter.yaml + - uses: dorny/paths-filter@v3 + id: me with: filters: | - sourceCode: - # Everything - - '**' - # Except stuff at the root of the repo - - '!*' - # Exclude changes to workflows in general - - '!.github/workflows/**' - # Alternative representation of the sourceCode list: - sourceCode1: ['**', '!*', '!.github/workflows/**'] self: # Include changes to THIS workflow - '.github/workflows/paths-filtering-tests.yml' predicate-quantifier: 'every' outputs: - inScope: ${{ steps.filter.outputs.sourceCode == 'true' || steps.filter.outputs.self == 'true' }} + inScope: ${{ steps.shared.outputs.sorceCode == 'true' || steps.me.outputs.self == 'true' }} # A required status check for when 'inScope' files are changed in-scope: From 2ff73ae97458ec4aec789dc7ce5c5b74f4780629 Mon Sep 17 00:00:00 2001 From: Mikkel Christensen Date: Wed, 12 Nov 2025 15:14:23 +0100 Subject: [PATCH 4/6] Added AWOL predicate-quantifier to the 'shared' filter. --- .github/workflows/paths-filtering-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/paths-filtering-tests.yml b/.github/workflows/paths-filtering-tests.yml index 1f2bfbd..f01d8fa 100644 --- a/.github/workflows/paths-filtering-tests.yml +++ b/.github/workflows/paths-filtering-tests.yml @@ -16,6 +16,7 @@ jobs: id: shared with: filters: .github/sharedPathFilter.yaml + predicate-quantifier: 'every' - uses: dorny/paths-filter@v3 id: me with: From 7d4e32231d9f22ac20c96eacda29fdf6abdd6f8b Mon Sep 17 00:00:00 2001 From: Mikkel Christensen Date: Wed, 12 Nov 2025 15:15:37 +0100 Subject: [PATCH 5/6] Fixed wrong file name extension on referenced shared filter file --- .github/workflows/paths-filtering-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paths-filtering-tests.yml b/.github/workflows/paths-filtering-tests.yml index f01d8fa..5d4c875 100644 --- a/.github/workflows/paths-filtering-tests.yml +++ b/.github/workflows/paths-filtering-tests.yml @@ -15,7 +15,7 @@ jobs: - uses: dorny/paths-filter@v3 id: shared with: - filters: .github/sharedPathFilter.yaml + filters: .github/sharedPathFilter.yml predicate-quantifier: 'every' - uses: dorny/paths-filter@v3 id: me From 27e797bc6b2779e458d6d5433fee7803046d2e5a Mon Sep 17 00:00:00 2001 From: Mikkel Christensen Date: Wed, 12 Nov 2025 15:22:53 +0100 Subject: [PATCH 6/6] Corrected wrong property name in reference to the shared path filter output. --- .github/workflows/paths-filtering-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paths-filtering-tests.yml b/.github/workflows/paths-filtering-tests.yml index 5d4c875..fc45296 100644 --- a/.github/workflows/paths-filtering-tests.yml +++ b/.github/workflows/paths-filtering-tests.yml @@ -26,7 +26,7 @@ jobs: - '.github/workflows/paths-filtering-tests.yml' predicate-quantifier: 'every' outputs: - inScope: ${{ steps.shared.outputs.sorceCode == 'true' || steps.me.outputs.self == 'true' }} + inScope: ${{ steps.shared.outputs.sourceCode == 'true' || steps.me.outputs.self == 'true' }} # A required status check for when 'inScope' files are changed in-scope: