Skip to content

Commit

Permalink
ci: add renovate
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Apr 29, 2024
1 parent 96d91b6 commit d0370dd
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 1 deletion.
115 changes: 115 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":gitSignOff",
"helpers:pinGitHubActionDigests"
],
// This ensures that the gitAuthor and gitSignOff fields match
"gitAuthor": "renovate[bot] <[email protected]>",
"includePaths": [
".github/workflows/**",
"go.mod",
"go.sum",
"Dockerfile",
],
postUpdateOptions: [
"gomodTidy"
],
"pinDigests": true,
"ignorePresets": [":prHourlyLimit2"],
"separateMajorMinor": true,
"separateMultipleMajor": true,
"separateMinorPatch": true,
"pruneStaleBranches": true,
"baseBranches": [
"main"
],
"vulnerabilityAlerts": {
"enabled": true
},
"labels": [
"dependencies",
"renovate/stop-updating",
],
"stopUpdatingLabel": "renovate/stop-updating",
"packageRules": [
{
"groupName": "all github action dependencies",
"groupSlug": "all-github-action",
"matchPaths": [
".github/workflows/**"
],
"matchUpdateTypes": [
"major",
"minor",
"digest",
"patch",
"pin",
"pinDigest"
]
},
{
"groupName": "all go dependencies main",
"groupSlug": "all-go-deps-main",
"matchFiles": [
"go.mod",
"go.sum"
],
"postUpdateOptions": [
// update source import paths on major updates
"gomodUpdateImportPaths",
],
"matchUpdateTypes": [
"major",
"minor",
"digest",
"patch",
"pin",
"pinDigest"
],
matchBaseBranches: [
"main"
],
},
{
"groupName": "Go",
"matchDepNames": [
"go",
"docker.io/library/golang"
],
},
{
// Avoid updating patch releases of golang in go.mod
"enabled": "false",
"matchFiles": [
"go.mod",
],
"matchDepNames": [
"go"
],
"matchDatasources": [
"golang-version"
],
"matchUpdateTypes": [
"patch"
],
matchBaseBranches: [
"main"
]
},
],
"regexManagers": [
{
"fileMatch": [
"^\\.github/workflows/[^/]+\\.yaml$",
],
// This regex manages version strings in GitHub actions workflow files,
// similar to the examples shown here:
// https://docs.renovatebot.com/modules/manager/regex/#advanced-capture
"matchStrings": [
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)\\s+.+version: (?<currentValue>.*)"
]
},
]
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/mozillazg/ptcpdump

go 1.21.7
go 1.21.0

require (
github.com/cilium/ebpf v0.14.0
Expand Down

0 comments on commit d0370dd

Please sign in to comment.