Repository navigation
Keep runner images up to date with a weekly agentic workflow - #4362
Open
henrymercer wants to merge 4 commits into
Open
henrymercer wants to merge 4 commits into
henrymercer wants to merge 4 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
`aw.json` turns off the manual operations in the generated maintenance workflow, which this repository doesn't use. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The saved README lacks decoded badge statuses, so rules may incorrectly add preview images or promote preview-only exclusions when the backing JSON is unavailable.
1 open issue
What changed in this PR
Adds weekly automation to keep the CodeQL Action’s CI runner-image matrix current as GitHub introduces, deprecates, or retires hosted images.
Changes:
- Adds a Copilot workflow that compares saved upstream sources with the image list and proposes narrowly scoped PRs.
- Configures maintainer approval, threat detection, duplicate-proposal handling, and automatic expiry of unattended PRs.
- Integrates generated workflows with formatting, dependency updates, size reporting, and required-check tooling.
| File | Description |
|---|---|
pr-checks/runner-images.yml |
Adds a comment identifying the workflow that maintains the list. |
pr-checks/excluded.yml |
Excludes scheduled automation jobs from required-check synchronization. |
.prettierignore |
Excludes generated workflow YAML from formatting. |
.github/workflows/update-runner-images.md |
Defines the weekly agent, update rules, and PR safeguards. |
.github/workflows/update-runner-images.lock.yml |
Adds the compiled runner-image update workflow. |
.github/workflows/aw.json |
Disables unused maintenance operations. |
.github/workflows/agentics-maintenance.yml |
Adds generated cleanup for expired automation resources. |
.github/sizeup.yml |
Excludes generated workflows from PR size calculations. |
.github/dependabot.yml |
Excludes compiler-managed workflows and action references from updates. |
.github/copilot-instructions.md |
Documents generated gh-aw files and their reviewable sources. |
.github/aw/actions-lock.json |
Records the pinned gh-aw setup action. |
.gitattributes |
Marks generated workflows for GitHub’s generated-file handling. |
Review effort: Max (adaptive)
henrymercer
marked this pull request as ready for review
November 27, 2026 17:57
This branch has not been deployed
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.

This PR adds a weekly gh-aw agentic workflow that keeps
pr-checks/runner-images.yml, the list of images that therunner-imagesPR check runs on, up to date. That way we add new images, and stop testing retiring ones two weeks before their brownouts start, rather than finding out when required checks fail.The workflow's instructions are in
.github/workflows/update-runner-images.md, whichgh aw compilecompiles toupdate-runner-images.lock.yml. Copilot compares the list with the runner images README and the open announcements in actions/runner-images, and opens a PR if something needs to change. Most weeks, nothing will. When GitHub announces that it's retiring an image in the list, or the agent removes one, its PR lists any references to that image in our other workflows, PR check templates andpr-checks/sync.ts, for a maintainer to update. Each image has a required check, so when the agent adds or removes images, its PR asks a maintainer to update the required checks withpr-checks/sync-checks.tsonce the PR's checks have passed. It doesn't propose changes that one of its open PRs already makes.gh-aw pushes the PR's branch and opens the PR with
GITHUB_TOKEN, and can only open it if the agent's changes are limited topr-checks/runner-images.yml. Pushes withGITHUB_TOKENdon't start workflow runs, and the PR's workflow runs wait for a maintainer to approve them. gh-aw also usesGITHUB_TOKENfor its other changes to the PR, and doesn't push the empty commit it can use to start CI, so thatGH_AW_GITHUB_TOKENandGH_AW_CI_TRIGGER_TOKENsecrets can't start the PR's runs without approval. If threat detection flags the agent's changes, or fails, the run fails without opening a PR. Detection also runs in weeks when nothing needs to change, so a detection failure fails those runs too.The agent runs in gh-aw's sandbox and can't reach GitHub directly. Its GitHub tools hide the runner images announcements, since their authors have the
CONTRIBUTORauthor association, so the workflow saves the announcements, along with the README, before the agent starts.PRs that are still open after two weeks are closed by
agentics-maintenance.yml, a daily workflow thatgh aw compilegenerates. Unchecking a PR'sexpiresline keeps it open. The next run proposes the changes from expired PRs again if they're still needed, so a maintainer should close any PR whose changes we don't want..github/workflows/aw.jsonturns off the maintenance workflow's manual operations, which we don't use. When the agent fails, gh-aw opens an issue, which the maintenance workflow closes after a week. Dependabot skips both generated workflows, since recompiling would revert its updates.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Environments:
How did/will you validate this change?
macos-26-xlargeremoved frompr-checks/runner-images.yml, the agent added it back, and gh-aw pushed its branch and opened Test of the runner images agentic workflow (please ignore) #4361 withGITHUB_TOKEN, keeping the agent's commit message. Nothing ran on the push, and Test of the runner images agentic workflow (please ignore) #4361's workflow runs, including therunner-imagescheck, waited for approval. The agent also leftwindows-2025in place, since [Windows] Visual Studio 2027 are now available; Visual Studio 2026 labels begin deprecation in December actions/runner-images#15373 only deprecates thewindows-2025-vs2026label. I haven't tested PR expiry. After merging, I'll run the workflow onmain.If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Update runner imagesruns, which gh-aw reports in issues.Are there any special considerations for merging or releasing this change?
Merge / deployment checklist