From 0a890f6541e0d4ac9754c209bd7558b76112faf8 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 27 Mar 2025 10:51:04 -0700 Subject: [PATCH 1/7] Update PR-powershell-lts.yml --- .github/workflows/PR-powershell-lts.yml | 36 +++++++++++++++++++------ 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/PR-powershell-lts.yml b/.github/workflows/PR-powershell-lts.yml index e5d954bc..2880ac01 100644 --- a/.github/workflows/PR-powershell-lts.yml +++ b/.github/workflows/PR-powershell-lts.yml @@ -26,26 +26,46 @@ env: HOMEBREW_NO_INSTALL_CLEANUP: 1 jobs: - homebrew-formula-lts: - timeout-minutes: 15 - runs-on: macos-latest + changes: + if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell' + name: Change Detection + runs-on: ubuntu-latest + # Required permissions + permissions: + pull-requests: read + # Set job outputs to values from filter step + outputs: + source: ${{ steps.filter.outputs.workflows }} steps: - - name: Checkout + - name: checkout uses: actions/checkout@v4 - - name: Check for applicable files - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 + # For pull requests it's not necessary to checkout the code + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0 id: filter with: + list-files: json filters: | workflows: - '.github/workflows/PR-powershell-lts.yml' - 'Formula/powershell-lts.rb' + - name: Capture outputs + run: | + "workflows: ${{ steps.filter.outputs.workflows }}" + shell: pwsh + + homebrew-formula-lts: + timeout-minutes: 15 + needs: changes + if: ${{ needs.changes.outputs.workflows == 'true' }} + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Prepare Agent - if: steps.filter.outputs.workflows == 'true' uses: ./.github/workflows/composite/prep - name: Install and Test Formula - if: steps.filter.outputs.workflows == 'true' uses: ./.github/workflows/composite/installAndTest From 2669a7b80f85244395206f6407c6ff0f07288ffe Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 27 Mar 2025 10:53:09 -0700 Subject: [PATCH 2/7] Add 'ready_to_merge' job to workflow --- .github/workflows/PR-powershell-lts.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/PR-powershell-lts.yml b/.github/workflows/PR-powershell-lts.yml index 2880ac01..a5226b14 100644 --- a/.github/workflows/PR-powershell-lts.yml +++ b/.github/workflows/PR-powershell-lts.yml @@ -69,3 +69,13 @@ jobs: - name: Install and Test Formula uses: ./.github/workflows/composite/installAndTest + + ready_to_merge: + name: Linux ready to merge + needs: + - homebrew-formula-lts + - changes + if: always() + uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0 + with: + needs_context: ${{ toJson(needs) }} From 8afc0453947df571f82c98029bcc8710fe485bfd Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 27 Mar 2025 10:55:04 -0700 Subject: [PATCH 3/7] Update .github/workflows/PR-powershell-lts.yml --- .github/workflows/PR-powershell-lts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PR-powershell-lts.yml b/.github/workflows/PR-powershell-lts.yml index a5226b14..c269bdf8 100644 --- a/.github/workflows/PR-powershell-lts.yml +++ b/.github/workflows/PR-powershell-lts.yml @@ -71,7 +71,7 @@ jobs: uses: ./.github/workflows/composite/installAndTest ready_to_merge: - name: Linux ready to merge + name: LTS ready to merge needs: - homebrew-formula-lts - changes From df00965843e12ae25a3c16873fe942a02d9da164 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 27 Mar 2025 10:57:15 -0700 Subject: [PATCH 4/7] Update PR-powershell-preview.yml --- .github/workflows/PR-powershell-preview.yml | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/PR-powershell-preview.yml b/.github/workflows/PR-powershell-preview.yml index 22326bcb..da479964 100644 --- a/.github/workflows/PR-powershell-preview.yml +++ b/.github/workflows/PR-powershell-preview.yml @@ -26,8 +26,39 @@ env: HOMEBREW_NO_INSTALL_CLEANUP: 1 jobs: + changes: + if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell' + name: Change Detection + runs-on: ubuntu-latest + # Required permissions + permissions: + pull-requests: read + # Set job outputs to values from filter step + outputs: + source: ${{ steps.filter.outputs.workflows }} + steps: + - name: checkout + uses: actions/checkout@v4 + + # For pull requests it's not necessary to checkout the code + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0 + id: filter + with: + list-files: json + filters: | + workflows: + - '.github/workflows/PR-powershell-lts.yml' + - 'Formula/powershell-lts.rb' + + - name: Capture outputs + run: | + "workflows: ${{ steps.filter.outputs.workflows }}" + shell: pwsh + homebrew-formula-preview: timeout-minutes: 15 + needs: changes + if: ${{ needs.changes.outputs.workflows == 'true' }} runs-on: macos-latest steps: - name: Checkout @@ -49,3 +80,13 @@ jobs: - name: Install and Test Formula if: steps.filter.outputs.workflows == 'true' uses: ./.github/workflows/composite/installAndTest + + ready_to_merge: + name: Preview ready to merge + needs: + - homebrew-formula-preview + - changes + if: always() + uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0 + with: + needs_context: ${{ toJson(needs) }} From f2ba8561193dcc6f61807559c8b94c21ab141656 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 27 Mar 2025 10:59:43 -0700 Subject: [PATCH 5/7] Update PR-powershell.yml --- .github/workflows/PR-powershell.yml | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/PR-powershell.yml b/.github/workflows/PR-powershell.yml index d54b3f10..3260b860 100644 --- a/.github/workflows/PR-powershell.yml +++ b/.github/workflows/PR-powershell.yml @@ -28,8 +28,39 @@ env: HOMEBREW_NO_INSTALL_CLEANUP: 1 jobs: + changes: + if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell' + name: Change Detection + runs-on: ubuntu-latest + # Required permissions + permissions: + pull-requests: read + # Set job outputs to values from filter step + outputs: + source: ${{ steps.filter.outputs.workflows }} + steps: + - name: checkout + uses: actions/checkout@v4 + + # For pull requests it's not necessary to checkout the code + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0 + id: filter + with: + list-files: json + filters: | + workflows: + - '.github/workflows/PR-powershell-lts.yml' + - 'Formula/powershell-lts.rb' + + - name: Capture outputs + run: | + "workflows: ${{ steps.filter.outputs.workflows }}" + shell: pwsh + homebrew-formula-stable: timeout-minutes: 15 + needs: changes + if: ${{ needs.changes.outputs.workflows == 'true' }} runs-on: macos-latest steps: - name: Checkout @@ -60,3 +91,13 @@ jobs: - name: Install and Test Formula if: steps.filter.outputs.workflows == 'true' uses: ./.github/workflows/composite/installAndTest + + ready_to_merge: + name: Stable ready to merge + needs: + - homebrew-formula-stable + - changes + if: always() + uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0 + with: + needs_context: ${{ toJson(needs) }} From b40138402d715308f48fb23ebf168cf311d528e7 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 27 Mar 2025 11:01:22 -0700 Subject: [PATCH 6/7] Update PR-powershell-daily.yml --- .github/workflows/PR-powershell-daily.yml | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/PR-powershell-daily.yml b/.github/workflows/PR-powershell-daily.yml index 48550fb7..2bd056ff 100644 --- a/.github/workflows/PR-powershell-daily.yml +++ b/.github/workflows/PR-powershell-daily.yml @@ -28,8 +28,39 @@ env: HOMEBREW_NO_INSTALL_CLEANUP: 1 jobs: + changes: + if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell' + name: Change Detection + runs-on: ubuntu-latest + # Required permissions + permissions: + pull-requests: read + # Set job outputs to values from filter step + outputs: + source: ${{ steps.filter.outputs.workflows }} + steps: + - name: checkout + uses: actions/checkout@v4 + + # For pull requests it's not necessary to checkout the code + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0 + id: filter + with: + list-files: json + filters: | + workflows: + - '.github/workflows/PR-powershell-lts.yml' + - 'Formula/powershell-lts.rb' + + - name: Capture outputs + run: | + "workflows: ${{ steps.filter.outputs.workflows }}" + shell: pwsh + homebrew-formula-daily: timeout-minutes: 15 + needs: changes + if: ${{ needs.changes.outputs.workflows == 'true' }} runs-on: macos-latest steps: - name: Checkout @@ -51,3 +82,13 @@ jobs: - name: Install and Test Formula if: steps.filter.outputs.workflows == 'true' uses: ./.github/workflows/composite/installAndTest + + ready_to_merge: + name: LTS ready to merge + needs: + - homebrew-formula-lts + - changes + if: always() + uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0 + with: + needs_context: ${{ toJson(needs) }} From db674a50f76074ce4eb0b12a13caf0ed72d78aed Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 27 Mar 2025 11:05:07 -0700 Subject: [PATCH 7/7] Update workflow names and dependencies --- .github/workflows/PR-powershell-daily.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/PR-powershell-daily.yml b/.github/workflows/PR-powershell-daily.yml index 2bd056ff..bcd487c8 100644 --- a/.github/workflows/PR-powershell-daily.yml +++ b/.github/workflows/PR-powershell-daily.yml @@ -84,9 +84,9 @@ jobs: uses: ./.github/workflows/composite/installAndTest ready_to_merge: - name: LTS ready to merge + name: Daily ready to merge needs: - - homebrew-formula-lts + - homebrew-formula-daily - changes if: always() uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0