Repository navigation
Conversation
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
polochang-circle
force-pushed
the
fix/attach-release-assets-runs-on-input
branch
from
November 12, 2026 10:28
0b6a6a1 to
476b6a6
Compare
zepeng811
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This repository holds 4 reusable workflows. Only
pr-scan.yamllets the caller select a runner. The other 3 hardcoderuns-on: ubuntu-latest.This PR adds a
runs-oninput to those 3 workflows:attach-release-assets.yamlrelease_attach_assetsubuntu-latest${{ inputs.runs-on }}actions-lint.yamllint_validate_actionsubuntu-latest${{ inputs.runs-on }}conventional-commit-release.yamlcommit-lintubuntu-latest${{ inputs.runs-on }}conventional-commit-release.yamlreleaseubuntu-latest${{ inputs.runs-on }}Each new input copies the
runs-oninput thatpr-scan.yamlalready defines. The description text,required: false,type: stringand theubuntu-latestdefault all match that input.conventional-commit-release.yamlapplies one input to both of its jobs.pr-scan.yamlkeeps its current content. This PR does not change it.The default keeps the current behaviour, so no existing caller changes.
Why this change is needed
A GitHub organization can enforce a runner policy. Such a policy can forbid the GitHub-hosted
ubuntu-*labels and allow only approved runners. The policy then cancels any run that uses a forbidden label.A policy of that kind reads every job in the caller workflow file. It also reads the jobs of each reusable workflow that the caller starts. It reads a job even when an
ifcondition skips that job.A hardcoded
runs-ontherefore breaks the caller in two ways:Point 2 is the harder one. A caller that starts
attach-release-assets.yamlonly on a push to the default branch still loses its pull request runs, because the policy reads the skipped job too.The same risk applies to
actions-lint.yamlandconventional-commit-release.yaml. This PR covers all 3 workflows together, so no gap remains.A caller-supplied
runs-onalso helps anyone who wants a larger runner or a self-hosted runner for these workflows.Decision: this PR keeps the harden-runner step
PR #38 removes the
step-security/harden-runnerstep and theid-token: writepermission from these workflows. That removal assumes the job always runs on a custom runner that carries a built-in security agent.That assumption holds only while
runs-onstays hardcoded to such a runner. Onceruns-onbecomes a caller input, the workflow cannot know what the caller passes. A caller that passesubuntu-latestwould then run with no runner-level agent and no workflow-level harden-runner.I considered an
if:condition that starts harden-runner only on a runner without a built-in agent. I rejected that option for three reasons:This PR therefore keeps harden-runner for every runner.
Please confirm one point: the harden-runner action must support a runner that already carries a security agent. I did not test that combination.
Relationship to PR #38
I opened a separate PR instead of a rebase of #38. PR #38 changes the same 4 files. Reasons:
master. PR chore(ci): bump github actions to node 24 #39 and PR chore(ci): swap release-please path to step-security fork on node 24 #41 pinned the actions to commit SHAs with version comments.I excluded the SHA pinning from this PR, because
masteralready has it.I did not close #38. Please decide what to do with it. I recommend that you close it in favour of this PR.
Open question for the repo owner: which default?
This PR uses
ubuntu-latestas the default for all 3 inputs. That value keeps the current behaviour and matchespr-scan.yaml. Please confirm that choice or change it.The trade-off:
ubuntu-latestworks for every consumer. Each consumer that needs another runner must then pass one.This repository is public and has 14 forks. I could not determine if a real external consumer exists. That answer decides the default.
Required follow-up: the
v1tagA merge of this PR does not reach any consumer. Consumers use
@v1.The
v1tag points to057a20a7d108daaad3dc5e8e119cc2d53e42207c, which is release v1.3.5. The tagsv1,v1.3andstableall still point to that commit.masteris 7 commits ahead, up to release v1.3.8.The automatic tag move failed. The "Create additional tags" step of run 28533433898 failed with this error:
The release token appears to lack permission to write a git reference.
Two actions remain outside the scope of this PR:
v1,v1.3andstableto a commit that contains this change.The
stabletag matters too. The "Checkout Configs" step ofpr-scan.yamlchecks out this repository atref: stable.I move no tag in this PR. Please tell me who owns that step.
Testing
.github/workflows/still hardcodes a runner label.runs-onvalue. The default keeps those calls working.attach-release-assets.yaml.🤖 Generated with Claude Code