← 输入框|github.com|刷新
Skip to content

Read the runner-images check's images from a file when it runs - #4360

Open
henrymercer wants to merge 6 commits into
mainfrom
henrymercer/runner-images-data-file
Open

henrymercer wants to merge 6 commits into
mainfrom
henrymercer/runner-images-data-file

Conversation

@henrymercer

Copy link
Copy Markdown
Contributor

This moves the runner images that the runner-images PR check runs on to pr-checks/runner-images.yml, which the check's workflow reads when it runs. It prepares for a weekly gh-aw agentic workflow that keeps the images up to date, which a follow-up PR will add. That workflow's PRs will then only change this file, so it can push them with GITHUB_TOKEN, which can't change workflows, rather than needing an app token that can.

pr-checks/sync.ts generates workflows with a fixed matrix, so the check moves to a hand-written workflow, .github/workflows/runner-images.yml. Its new Read runner images job outputs the labels listed under images in the file, and the check runs on each of them. The workflow and job keep their names, and the matrix keeps its keys, so the existing check runs keep theirs. Unlike the generated workflow, it doesn't have the workflow_call trigger or the workflow_dispatch inputs for the Go and .NET versions, which nothing uses.

The file also lists the images that the check leaves out, with the reasons. pr-checks/runner-images.schema.json describes the file's format, and a pr-checks test checks the file against it. The reason for leaving out xcode-27 now says that CodeQL doesn't support traced analysis on it, rather than that it's a preview image, since it's now generally available (actions/runner-images#15397).

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Environments:

  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).
  • End-to-end tests - I am depending on PR checks (i.e. tests in pr-checks).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Development/testing only - This change cannot cause any failures in production.

How will you know if something goes wrong after this change is released?

  • Other - The runner-images check fails, or its required checks stay pending.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

henrymercer and others added 6 commits November 27, 2026 16:25
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…now GA

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI adaptive review requested due to automatic review settings November 27, 2026 17:03
@github-actions github-actions Bot added the size/L May be hard to review label Nov 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The runtime-derived matrix adds a shared prerequisite for required runner-image checks, changing CI scheduling, failure propagation, and retry behavior enough to warrant human review.

No open issues 🎉

1 file not reviewed
What changed in this PR

Moves the runner-image list into a separate data file that the CodeQL integration check reads at runtime. This prepares for automated image updates without requiring permission to modify workflows.

Changes:

  • Replaces the generated check with a hand-written workflow while preserving existing check names.
  • Adds the image list, exclusion reasons, and schema validation.
  • Keeps the workflow registered for automatic retries.
File Description
pr-checks/​runner-images.yml Defines tested images, exclusions, and required-check update guidance.
pr-checks/​runner-images.test.ts Validates the image file against its schema.
pr-checks/​runner-images.schema.json Defines the image file’s format and constraints.
pr-checks/​package.json Adds the schema-validation dependency.
pr-checks/​deflake.ts Registers the hand-written workflow for retries.
pr-checks/​checks/​runner-images.yml Removes the former generated-check template.
package-lock.json Records the workspace dependency change.
.github/​workflows/​runner-images.yml Reads the image list and runs the integration-test matrix.

Review effort: Balanced (adaptive)

@henrymercer
henrymercer marked this pull request as ready for review November 27, 2026 17:33
@henrymercer
henrymercer requested a review from a team as a code owner November 27, 2026 17:33
@henrymercer
henrymercer added this pull request to stack #4363 November 27, 2026 17:43
Comment thread .github/workflows/runner-images.yml Resolved

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L May be hard to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants