From e727f6b14dd10339656b79ef36f510f463655a6f Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 5 Nov 2026 13:55:34 -0800 Subject: [PATCH] ci(macos): the macOS jobs run on the self-hosted Mac when the repository enables it --- .github/workflows/macos-selfhosted.yaml | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/macos-selfhosted.yaml diff --git a/.github/workflows/macos-selfhosted.yaml b/.github/workflows/macos-selfhosted.yaml new file mode 100644 index 00000000..8108f21f --- /dev/null +++ b/.github/workflows/macos-selfhosted.yaml @@ -0,0 +1,36 @@ +# The macOS jobs on the Mac Mini of the owner. It is not part of the ladder and `required` does not +# wait for it. Nothing runs until the repository variable MACOS_SELF_HOSTED is `true`, so the workflow +# is inert while the machine is offline. A pull request starts it only with the label ci:macos-self, +# and never when it comes from a fork: a self-hosted runner must not run the code of a stranger. + +name: macos-selfhosted + +on: + workflow_dispatch: + push: + branches: + - master + # TEMPORARY: remove when komomono is merged to master + - komomono + pull_request: + types: [labeled] + +concurrency: + group: macos-selfhosted + cancel-in-progress: false + +permissions: + contents: read + +jobs: + macos: + if: >- + ${{ vars.MACOS_SELF_HOSTED == 'true' && ( + github.event_name != 'pull_request' || ( + github.event.label.name == 'ci:macos-self' && + github.event.pull_request.head.repo.full_name == github.repository)) }} + uses: ./.github/workflows/_macos.yaml + with: + runs-on: '["self-hosted","macOS","ARM64"]' + install-nix: false + secrets: inherit