diff --git a/.github/action-filters.yml b/.github/action-filters.yml new file mode 100644 index 00000000000..9a61bc1947b --- /dev/null +++ b/.github/action-filters.yml @@ -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 diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 25437e70fc8..98183774460 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -48,22 +48,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 diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index 5a497114b90..0eeb1769f47 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -47,22 +47,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 diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 2801a4f2bdc..b745bc679ee 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -48,23 +48,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