Skip to content

Commit

Permalink
Update PR workflows so that status reports even when they skip (#1238)
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisEz13 authored Oct 17, 2023
1 parent 6a94e98 commit 3e979d5
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 18 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/PR-powershell-daily.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

name: PowerShell daily Formula
name: PowerShell daily Formula PR

permissions: read-all

on:
workflow_dispatch:
push:
paths:
- '.github/workflows/powershell-daily.yml'
- '.github/workflows/PR-powershell-daily.yml'
- 'Formula/powershell-daily.rb'
branches:
- master
pull_request:
paths:
- '.github/workflows/powershell-daily.yml'
- 'Formula/powershell-daily.rb'

defaults:
run:
Expand All @@ -37,9 +34,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Check for applicable files
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: filter
with:
filters: |
workflows:
- .github/workflows/PR-powershell-daily.yml
- Formula/powershell-daily.rb
- 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
16 changes: 12 additions & 4 deletions .github/workflows/PR-powershell-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ permissions: read-all
on:
push:
paths:
- '.github/workflows/powershell-lts.yml'
- '.github/workflows/PR-powershell-lts.yml'
- 'Formula/powershell-lts.rb'
branches:
- master
pull_request:
paths:
- '.github/workflows/powershell-lts.yml'
- 'Formula/powershell-lts.rb'

defaults:
run:
Expand All @@ -36,8 +33,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Check for applicable files
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: filter
with:
filters: |
workflows:
- '.github/workflows/PR-powershell-lts.yml'
- 'Formula/powershell-lts.rb'
- 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
16 changes: 12 additions & 4 deletions .github/workflows/PR-powershell-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ permissions: read-all
on:
push:
paths:
- '.github/workflows/powershell-preview.yml'
- '.github/workflows/PR-powershell-preview.yml'
- 'Formula/powershell-preview.rb'
branches:
- master
pull_request:
paths:
- '.github/workflows/powershell-preview.yml'
- 'Formula/powershell-preview.rb'

defaults:
run:
Expand All @@ -35,9 +32,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Check for applicable files
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: filter
with:
filters: |
workflows:
- .github/workflows/PR-powershell-preview.yml
- Formula/powershell-preview.rb
- 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
19 changes: 14 additions & 5 deletions .github/workflows/PR-powershell.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

name: PowerShell Formula CI
name: PowerShell Formula PR

permissions: read-all

on:
workflow_dispatch:
push:
paths:
- '.github/workflows/powershell.yml'
- '.github/workflows/PR-powershell.yml'
- 'Formula/powershell.rb'
branches:
- master
pull_request:
paths:
- '.github/workflows/powershell.yml'
- 'Formula/powershell.rb'

defaults:
run:
Expand All @@ -38,10 +35,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Check for applicable files
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: filter
with:
filters: |
workflows:
- '.github/workflows/PR-powershell.yml'
- 'Formula/powershell.rb'
- name: Prepare Agent
if: steps.filter.outputs.workflows == 'true'
uses: ./.github/workflows/composite/prep

- name: Uninstall PowerShell
if: steps.filter.outputs.workflows == 'true'
shell: bash
run: |
cd /
Expand All @@ -50,4 +58,5 @@ jobs:
sudo pkgutil --forget ${PKG_ID}
- name: Install and Test Formula
if: steps.filter.outputs.workflows == 'true'
uses: ./.github/workflows/composite/installAndTest

0 comments on commit 3e979d5

Please sign in to comment.