Skip to content

Commit

Permalink
chore(renovate): update GitHub Actions major versions in docs (#7584)
Browse files Browse the repository at this point in the history
## Summary

Originally wanted to update the reference to `astral-sh/setup-uv` in
https://docs.astral.sh/uv/guides/integration/github/, but thought it
could be nice to automate those updates through Renovate. The custom
manager will look for any major version GitHub Action reference in any
Markdown file in `docs` directory, and raise a PR to update it.

Possible improvements:
- We could separate those updates from updating the actions updates for
uv's own GitHub Actions workflow, which would end up raising 2 different
PRs instead of grouping them (example of the current behaviour without
this improvement in
mkniewallner/mkv-playground#4 where we update
the doc reference at the same time as a real dependency usage in a
workflow).
- ~Should the PRs be raised immediately, to handle the update as soon as
possible, instead of waiting for the regular weekly Monday schedule?
This would ensure that `astral-sh/setup-uv` references are handled as
early as possible.~ done in
6af7f45

## Test Plan

I've tested that with
https:/mkniewallner/mkv-playground/blob/00ddfb69003843ad57d05f9ef036e655aaf765d7/renovate.json5
and
https:/mkniewallner/mkv-playground/blob/00ddfb69003843ad57d05f9ef036e655aaf765d7/docs/integeration/foo.md,
where Renovate raised 2 PRs:
- mkniewallner/mkv-playground#13
- mkniewallner/mkv-playground#4

---------

Co-authored-by: Zanie Blue <[email protected]>
  • Loading branch information
mkniewallner and zanieb authored Sep 20, 2024
1 parent b918557 commit 2144c8b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
matchManagers: ["cargo"],
enabled: false,
},
{
// Create dedicated branches to update references to dependencies in the documentation.
matchPaths: ["docs/**/*.md"],
commitMessageTopic: "documentation references to {{{depName}}}",
semanticCommitType: "docs",
semanticCommitScope: null,
additionalBranchPrefix: "docs-",
},
{
// Group upload/download artifact updates, the versions are dependent
groupName: "Artifact GitHub Actions dependencies",
Expand Down Expand Up @@ -64,6 +72,18 @@
enabled: false,
},
],
customManagers: [
// Update major GitHub actions references in documentation.
{
customType: "regex",
fileMatch: ["^docs/.*\\.md$"],
matchStrings: [
"\\suses: (?<depName>[\\w-]+/[\\w-]+)(?<path>/.*)?@(?<currentValue>.+?)\\s",
],
datasourceTemplate: "github-tags",
versioningTemplate: "regex:^v(?<major>\\d+)$",
},
],
vulnerabilityAlerts: {
commitMessageSuffix: "",
labels: ["internal", "security"],
Expand Down

0 comments on commit 2144c8b

Please sign in to comment.