Skip to content

Commit 5e9d4a8

Browse files
CopilotViir
andauthored
Exclude macOS from automatic workflow runs, include only on manual trigger
See also <https://github.com/orgs/community/discussions/26253#discussioncomment-3250989> * Exclude macOS from automatic workflow runs (push/PR), include only on workflow_dispatch Co-authored-by: Viir <19209696+Viir@users.noreply.github.com> * Add clarifying comments to workflow exclude expressions Co-authored-by: Viir <19209696+Viir@users.noreply.github.com> * Refactor to use isManualRun pattern for conditional matrix exclude Co-authored-by: Viir <19209696+Viir@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Viir <19209696+Viir@users.noreply.github.com>
1 parent b80e186 commit 5e9d4a8

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/build-native-tools.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,19 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
environment: [ubuntu-24.04, windows-2022, macos-14]
17+
isManualRun:
18+
- ${{ github.event_name == 'workflow_dispatch' }}
1719
include:
1820
- environment: ubuntu-24.04
1921
publish-runtime-id: linux-x64
2022
- environment: windows-2022
2123
publish-runtime-id: win-x64
2224
- environment: macos-14
2325
publish-runtime-id: osx-x64
26+
# Exclude macOS on automatic triggers (push). On manual workflow_dispatch, all environments run.
27+
exclude:
28+
- isManualRun: false
29+
environment: macos-14
2430

2531
runs-on: ${{ matrix.environment }}
2632

.github/workflows/test-and-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
environment: [ubuntu-24.04, windows-2022, macos-14]
16+
isManualRun:
17+
- ${{ github.event_name == 'workflow_dispatch' }}
1618
include:
1719
- environment: ubuntu-24.04
1820
publish-runtime-id: linux-x64
1921
- environment: windows-2022
2022
publish-runtime-id: win-x64
2123
- environment: macos-14
2224
publish-runtime-id: osx-x64
25+
# Exclude macOS on automatic triggers (push/PR). On manual workflow_dispatch, all environments run.
26+
exclude:
27+
- isManualRun: false
28+
environment: macos-14
2329

2430
runs-on: ${{ matrix.environment }}
2531

0 commit comments

Comments
 (0)