Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/PR-powershell-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread Dismissed

# 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
Expand All @@ -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: Daily ready to merge
needs:
- homebrew-formula-daily
- changes
if: always()
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0
with:
needs_context: ${{ toJson(needs) }}
46 changes: 38 additions & 8 deletions .github/workflows/PR-powershell-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,56 @@ 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
Comment thread Dismissed

- 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

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) }}
41 changes: 41 additions & 0 deletions .github/workflows/PR-powershell-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread Dismissed

# 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
Expand All @@ -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) }}
41 changes: 41 additions & 0 deletions .github/workflows/PR-powershell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread Dismissed

# 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
Expand Down Expand Up @@ -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) }}