Auto-sync vendored libkrun.h on Renovate bumps#111
Merged
Conversation
Add a GitHub Action that triggers when versions.env changes in a PR. If LIBKRUN_VERSION changed (not LIBKRUNFW-only), fetches the header from libkrun/libkrun at the new version, verifies it compiles, and commits it back to the PR branch — so a Renovate libkrun bump PR includes the vendored header update automatically. Removes the need for a manual task update-libkrun-header follow-up PR after every libkrun version bump.
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.
Problem
The automation we added in #106 left a manual gap: when Renovate bumps
LIBKRUN_VERSION, the vendoredkrun/libkrun.hdoesn't update automatically. We had to runtask update-libkrun-headerand open a follow-up PR (#110) — exactly the kind of manual step the automation was supposed to eliminate.Fix
Add
.github/workflows/sync-header.yaml— a GitHub Action that triggers whenversions.envchanges in a PR:LIBKRUN_VERSIONactually changed (diffs against the base SHA). Skips libkrunfw-only bumps, which don't affect the header.include/libkrun.hfromlibkrun/libkrun@<new version>, prepends the SPDX/vendored comment block.gcc -fsyntax-only) before committing.github-actions[bot].Renovate creates in-repo branches (same owner/repo, not forks), so
GITHUB_TOKENcan push directly to the PR head.Result
A Renovate libkrun bump PR now includes both the version pin and the vendored header in one PR — no follow-up needed. Scoped to
renovate[bot]actor +LIBKRUN_VERSIONchanges only, so it doesn't fire on unrelated PRs.