From 1ee9997e9912d7ba7ec05495c3b379bb52eb2d4b Mon Sep 17 00:00:00 2001 From: polochang-circle Date: Thu, 12 Nov 2026 18:28:31 +0800 Subject: [PATCH 1/2] fix: add runs-on input to attach-release-assets workflow The job hardcoded `ubuntu-latest`. A caller could not select a runner. A GitHub org can enforce a runner policy that forbids the GitHub-hosted `ubuntu-*` labels. Such a policy reads every job of each reusable workflow that a caller starts. It reads a job even when an `if` condition skips that job. A hardcoded label then cancels the whole run of that caller. This change adds a `runs-on` input. The job now reads that input. The input copies the existing `runs-on` input of `pr-scan.yaml`. The default stays `ubuntu-latest`, so current callers see no change. This change keeps the harden-runner step. The workflow cannot know if the caller-supplied runner carries a security agent. Co-Authored-By: Claude Opus 5 --- .github/workflows/attach-release-assets.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/attach-release-assets.yaml b/.github/workflows/attach-release-assets.yaml index c4117df..b34ac87 100644 --- a/.github/workflows/attach-release-assets.yaml +++ b/.github/workflows/attach-release-assets.yaml @@ -56,13 +56,19 @@ on: type: boolean required: false default: true + runs-on: + description: | + Github runner on which this workflow should run. + required: false + type: string + default: ubuntu-latest permissions: contents: write jobs: release_attach_assets: - runs-on: ubuntu-latest + runs-on: ${{ inputs.runs-on }} if: github.event_name == 'push' && format('refs/heads/{0}', github.event.repository.default_branch) == github.ref permissions: id-token: write From 476b6a61b1f55117939aeba476e178d77e83c497 Mon Sep 17 00:00:00 2001 From: polochang-circle Date: Thu, 12 Nov 2026 18:28:31 +0800 Subject: [PATCH 2/2] fix: add runs-on input to actions-lint and conventional-commit-release A caller could not select a runner for these two reusable workflows. Both hardcoded `ubuntu-latest`. An org runner policy that forbids GitHub-hosted labels cancels the whole run of such a caller. The policy reads the jobs of each reusable workflow that the caller starts. This change adds the same `runs-on` input that `pr-scan.yaml` defines. Each job now reads that input. `conventional-commit-release.yaml` applies one input to both of its jobs. The default stays `ubuntu-latest`, so current callers see no change. All 4 reusable workflows now accept a caller-supplied runner. Co-Authored-By: Claude Opus 5 --- .github/workflows/actions-lint.yaml | 9 ++++++++- .github/workflows/conventional-commit-release.yaml | 10 ++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions-lint.yaml b/.github/workflows/actions-lint.yaml index ad891a9..c53d298 100644 --- a/.github/workflows/actions-lint.yaml +++ b/.github/workflows/actions-lint.yaml @@ -18,10 +18,17 @@ name: Lint/Validate Github Actions files on: workflow_call: + inputs: + runs-on: + description: | + Github runner on which this workflow should run. + required: false + type: string + default: ubuntu-latest jobs: lint_validate_actions: - runs-on: ubuntu-latest + runs-on: ${{ inputs.runs-on }} permissions: id-token: write diff --git a/.github/workflows/conventional-commit-release.yaml b/.github/workflows/conventional-commit-release.yaml index 38572d9..d12c849 100644 --- a/.github/workflows/conventional-commit-release.yaml +++ b/.github/workflows/conventional-commit-release.yaml @@ -70,6 +70,12 @@ on: type: string required: false default: "" + runs-on: + description: | + Github runner on which this workflow should run. + required: false + type: string + default: ubuntu-latest outputs: release_created: description: "Whether or not a release has been created in this workflow instance" @@ -108,7 +114,7 @@ jobs: commit-lint: name: PR Title and Commits Lint if: github.event_name == 'pull_request' - runs-on: ubuntu-latest + runs-on: ${{ inputs.runs-on }} permissions: id-token: write @@ -196,7 +202,7 @@ jobs: release: if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) name: Release Please - runs-on: ubuntu-latest + runs-on: ${{ inputs.runs-on }} outputs: release_created: ${{ steps.release.outputs.release_created }} release_tag: ${{ steps.release.outputs.tag_name }}