[release/v7.5]Fix GitHub Action filter overmatching (#24958)

This commit is contained in:
Travis Plunk
2025-02-05 15:09:25 -08:00
committed by GitHub
parent caa937a1dc
commit 7be439282a
4 changed files with 86 additions and 49 deletions
+23
View File
@@ -0,0 +1,23 @@
github: &github
- .github/actions/**
- .github/workflows/**-ci.yml
tools: &tools
- tools/buildCommon/**
- tools/ci.psm1
props: &props
- '**.props'
tests: &tests
- test/powershell/**
- test/tools/**
- test/xUnit/**
mainSource: &mainSource
- src/**
buildModule: &buildModule
- build.psm1
source:
- *github
- *tools
- *props
- *buildModule
- *mainSource
- *tests
+21 -16
View File
@@ -46,22 +46,27 @@ jobs:
outputs:
source: ${{ steps.filter.outputs.source }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
source:
- ".github/actions/**"
- ".github/workflows/linux-ci.yml"
- "**.props"
- build.psm1
- src/**
- test/**
- tools/buildCommon/**
- tools/ci.psm1
- "!test/common/markdown/**"
- "!test/perf/**"
- name: checkout
uses: actions/checkout@v4.1.0
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
list-files: json
filters: .github/action-filters.yml
- name: Capture outputs
run: |
"source: ${{ steps.filter.outputs.source }}"
"github: ${{ steps.filter.outputs.github }}"
"tools: ${{ steps.filter.outputs.tools }}"
"props: ${{ steps.filter.outputs.props }}"
"tests: ${{ steps.filter.outputs.tests }}"
"mainSource: ${{ steps.filter.outputs.mainSource }}"
"buildModule: ${{ steps.filter.outputs.buildModule }}"
shell: pwsh
ci_build:
name: Build PowerShell
runs-on: ubuntu-20.04
+21 -16
View File
@@ -45,22 +45,27 @@ jobs:
outputs:
source: ${{ steps.filter.outputs.source }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
source:
- ".github/actions/**"
- ".github/workflows/macos-ci.yml"
- "**.props"
- build.psm1
- src/**
- test/**
- tools/buildCommon/**
- tools/ci.psm1
- "!test/common/markdown/**"
- "!test/perf/**"
- name: checkout
uses: actions/checkout@v4.1.0
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
list-files: json
filters: .github/action-filters.yml
- name: Capture outputs
run: |
"source: ${{ steps.filter.outputs.source }}"
"github: ${{ steps.filter.outputs.github }}"
"tools: ${{ steps.filter.outputs.tools }}"
"props: ${{ steps.filter.outputs.props }}"
"tests: ${{ steps.filter.outputs.tests }}"
"mainSource: ${{ steps.filter.outputs.mainSource }}"
"buildModule: ${{ steps.filter.outputs.buildModule }}"
shell: pwsh
ci_build:
name: Build PowerShell
runs-on: macos-latest
+21 -17
View File
@@ -46,23 +46,27 @@ jobs:
outputs:
source: ${{ steps.filter.outputs.source }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
source:
- ".github/actions/**"
- ".github/workflows/windows-ci.yml"
- "**.props"
- build.psm1
- src/**
- test/**
- tools/buildCommon/**
- tools/ci.psm1
- tools/WindowsCI.psm1
- "!test/common/markdown/**"
- "!test/perf/**"
- name: checkout
uses: actions/checkout@v4.1.0
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
list-files: json
filters: .github/action-filters.yml
- name: Capture outputs
run: |
"source: ${{ steps.filter.outputs.source }}"
"github: ${{ steps.filter.outputs.github }}"
"tools: ${{ steps.filter.outputs.tools }}"
"props: ${{ steps.filter.outputs.props }}"
"tests: ${{ steps.filter.outputs.tests }}"
"mainSource: ${{ steps.filter.outputs.mainSource }}"
"buildModule: ${{ steps.filter.outputs.buildModule }}"
shell: pwsh
ci_build:
name: Build PowerShell
needs: changes