Run macOS only when started by hand

Everyday work is built and tested on Linux only. macOS and Windows jobs run only when started by hand (workflow_dispatch: gh workflow run <workflow> --ref <branch>), not on pull requests or pushes to main. Release workflows are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-08 12:24:41 +02:00
parent 3d070a6bf2
commit 8441c66bdb
+5 -2
View File
@@ -3,6 +3,7 @@ on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
@@ -10,7 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-26]
# Linux only. macOS only when started by hand: gh workflow run checks --ref <branch>.
os: ${{ fromJSON(github.event_name == 'workflow_dispatch' && '["ubuntu-latest", "macos-26"]' || '["ubuntu-latest"]') }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@@ -375,7 +377,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-26]
# Linux only. macOS only when started by hand: gh workflow run checks --ref <branch>.
os: ${{ fromJSON(github.event_name == 'workflow_dispatch' && '["ubuntu-latest", "macos-26"]' || '["ubuntu-latest"]') }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4