Skip to content

Commit 7e1b990

Browse files
authored
[release/v7.4]Fix GitHub Action filter overmatching (PowerShell#24957)
1 parent 34eb453 commit 7e1b990

File tree

4 files changed

+86
-49
lines changed

4 files changed

+86
-49
lines changed

.github/action-filters.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
github: &github
2+
- .github/actions/**
3+
- .github/workflows/**-ci.yml
4+
tools: &tools
5+
- tools/buildCommon/**
6+
- tools/ci.psm1
7+
props: &props
8+
- '**.props'
9+
tests: &tests
10+
- test/powershell/**
11+
- test/tools/**
12+
- test/xUnit/**
13+
mainSource: &mainSource
14+
- src/**
15+
buildModule: &buildModule
16+
- build.psm1
17+
source:
18+
- *github
19+
- *tools
20+
- *props
21+
- *buildModule
22+
- *mainSource
23+
- *tests

.github/workflows/linux-ci.yml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,27 @@ jobs:
4646
outputs:
4747
source: ${{ steps.filter.outputs.source }}
4848
steps:
49-
# For pull requests it's not necessary to checkout the code
50-
- uses: dorny/paths-filter@v3
51-
id: filter
52-
with:
53-
filters: |
54-
source:
55-
- ".github/actions/**"
56-
- ".github/workflows/linux-ci.yml"
57-
- "**.props"
58-
- build.psm1
59-
- src/**
60-
- test/**
61-
- tools/buildCommon/**
62-
- tools/ci.psm1
63-
- "!test/common/markdown/**"
64-
- "!test/perf/**"
49+
- name: checkout
50+
uses: actions/[email protected]
51+
52+
# For pull requests it's not necessary to checkout the code
53+
- uses: dorny/paths-filter@v3
54+
id: filter
55+
with:
56+
list-files: json
57+
filters: .github/action-filters.yml
58+
59+
- name: Capture outputs
60+
run: |
61+
"source: ${{ steps.filter.outputs.source }}"
62+
"github: ${{ steps.filter.outputs.github }}"
63+
"tools: ${{ steps.filter.outputs.tools }}"
64+
"props: ${{ steps.filter.outputs.props }}"
65+
"tests: ${{ steps.filter.outputs.tests }}"
66+
"mainSource: ${{ steps.filter.outputs.mainSource }}"
67+
"buildModule: ${{ steps.filter.outputs.buildModule }}"
68+
shell: pwsh
69+
6570
ci_build:
6671
name: Build PowerShell
6772
runs-on: ubuntu-20.04

.github/workflows/macos-ci.yml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,27 @@ jobs:
4545
outputs:
4646
source: ${{ steps.filter.outputs.source }}
4747
steps:
48-
# For pull requests it's not necessary to checkout the code
49-
- uses: dorny/paths-filter@v3
50-
id: filter
51-
with:
52-
filters: |
53-
source:
54-
- ".github/actions/**"
55-
- ".github/workflows/macos-ci.yml"
56-
- "**.props"
57-
- build.psm1
58-
- src/**
59-
- test/**
60-
- tools/buildCommon/**
61-
- tools/ci.psm1
62-
- "!test/common/markdown/**"
63-
- "!test/perf/**"
48+
- name: checkout
49+
uses: actions/[email protected]
50+
51+
# For pull requests it's not necessary to checkout the code
52+
- uses: dorny/paths-filter@v3
53+
id: filter
54+
with:
55+
list-files: json
56+
filters: .github/action-filters.yml
57+
58+
- name: Capture outputs
59+
run: |
60+
"source: ${{ steps.filter.outputs.source }}"
61+
"github: ${{ steps.filter.outputs.github }}"
62+
"tools: ${{ steps.filter.outputs.tools }}"
63+
"props: ${{ steps.filter.outputs.props }}"
64+
"tests: ${{ steps.filter.outputs.tests }}"
65+
"mainSource: ${{ steps.filter.outputs.mainSource }}"
66+
"buildModule: ${{ steps.filter.outputs.buildModule }}"
67+
shell: pwsh
68+
6469
ci_build:
6570
name: Build PowerShell
6671
runs-on: macos-latest

.github/workflows/windows-ci.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,27 @@ jobs:
4646
outputs:
4747
source: ${{ steps.filter.outputs.source }}
4848
steps:
49-
# For pull requests it's not necessary to checkout the code
50-
- uses: dorny/paths-filter@v3
51-
id: filter
52-
with:
53-
filters: |
54-
source:
55-
- ".github/actions/**"
56-
- ".github/workflows/windows-ci.yml"
57-
- "**.props"
58-
- build.psm1
59-
- src/**
60-
- test/**
61-
- tools/buildCommon/**
62-
- tools/ci.psm1
63-
- tools/WindowsCI.psm1
64-
- "!test/common/markdown/**"
65-
- "!test/perf/**"
49+
- name: checkout
50+
uses: actions/[email protected]
51+
52+
# For pull requests it's not necessary to checkout the code
53+
- uses: dorny/paths-filter@v3
54+
id: filter
55+
with:
56+
list-files: json
57+
filters: .github/action-filters.yml
58+
59+
- name: Capture outputs
60+
run: |
61+
"source: ${{ steps.filter.outputs.source }}"
62+
"github: ${{ steps.filter.outputs.github }}"
63+
"tools: ${{ steps.filter.outputs.tools }}"
64+
"props: ${{ steps.filter.outputs.props }}"
65+
"tests: ${{ steps.filter.outputs.tests }}"
66+
"mainSource: ${{ steps.filter.outputs.mainSource }}"
67+
"buildModule: ${{ steps.filter.outputs.buildModule }}"
68+
shell: pwsh
69+
6670
ci_build:
6771
name: Build PowerShell
6872
needs: changes

0 commit comments

Comments
 (0)