From 88babfcdc7f6c4576482003b6b78ac6a3e773919 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Mon, 13 Apr 2026 16:41:33 +0200 Subject: [PATCH] require GitHub-hosted runners in reusable build jobs Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/bake.yml | 11 +++++++++++ .github/workflows/build.yml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/bake.yml b/.github/workflows/bake.yml index 16a40e1..57d4647 100644 --- a/.github/workflows/bake.yml +++ b/.github/workflows/bake.yml @@ -473,6 +473,17 @@ jobs: result_18: ${{ steps.result.outputs.result_18 }} result_19: ${{ steps.result.outputs.result_19 }} steps: + - + name: Require GitHub-hosted runner + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + env: + INPUT_RUNNER-ENVIRONMENT: ${{ runner.environment }} + with: + script: | + const runnerEnvironment = core.getInput('runner-environment'); + if (runnerEnvironment !== 'github-hosted') { + core.setFailed(`This workflow requires a GitHub-hosted runner, got: ${runnerEnvironment || 'unknown'}`); + } - name: Install dependencies uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c94ac78..6e86c71 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -366,6 +366,17 @@ jobs: result_18: ${{ steps.result.outputs.result_18 }} result_19: ${{ steps.result.outputs.result_19 }} steps: + - + name: Require GitHub-hosted runner + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + env: + INPUT_RUNNER-ENVIRONMENT: ${{ runner.environment }} + with: + script: | + const runnerEnvironment = core.getInput('runner-environment'); + if (runnerEnvironment !== 'github-hosted') { + core.setFailed(`This workflow requires a GitHub-hosted runner, got: ${runnerEnvironment || 'unknown'}`); + } - name: Install dependencies uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0