Skip to content

Commit

Permalink
chore: improved renovate configuration for goreleaser version
Browse files Browse the repository at this point in the history
  • Loading branch information
kvanzuijlen committed May 15, 2024
1 parent 4a25fd7 commit 4a5f7ab
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
24 changes: 16 additions & 8 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,37 +1,45 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
semanticCommits: "auto",
extends: ["config:best-practices"],
labels: ["semver:patch", "kind:dependencies"],
customDatasources: {
goreleaser: {
defaultRegistryUrlTemplate: "https://goreleaser.com/static/releases.json",
transformTemplates: [
'{"releases":$.{"version":$.tag_name,"changelogUrl":$join(["https://github.com/goreleaser/goreleaser/releases/tag/",$.tag_name]),"sourceUrl":"https://github.com/goreleaser/goreleaser","homepage":"https://goreleaser.com/"},"sourceUrl":"https://github.com/goreleaser/goreleaser","homepage":"https://goreleaser.com/"}',
],
},
},
customManagers: [
{
currentValueTemplate: "nonroot",
customType: "regex",
datasourceTemplate: "docker",
depNameTemplate: "gcr.io/distroless/static",
fileMatch: "^Dockerfile",
matchStrings: ['ARG BASE_IMAGE_DIGEST="(?<currentDigest>.*)"'],
depNameTemplate: "gcr.io/distroless/static",
currentValueTemplate: "nonroot",
datasourceTemplate: "docker",
},
{
customType: "regex",
fileMatch: "(^|\\/)(?:workflow-templates|\\.github\\/(?:workflows|actions))\\/.+\\.ya?ml$",
matchStrings: [
"version: (?<currentValue>.*?)\\s+# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s",
"version: (?<currentValue>.*?)\\s+# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?( packageName=(?<packageName>.*?))?\\s",
],
},
],
labels: ["semver:patch", "kind:dependencies"],
packageRules: [
{
matchDepNames: "gcr.io/distroless/static",
groupName: "gcr.io/distroless/static",
matchDepNames: "gcr.io/distroless/static",
},
{
matchManagers: ["github-actions"],
labels: ["semver:none", "kind:chore"],
matchManagers: ["github-actions"],
},
{
matchManagers: ["poetry"],
rangeStrategy: "pin",
},
],
semanticCommits: "auto",
}
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
with:
version: v1.25.1 # renovate: datasource=github-tags depName=goreleaser/goreleaser
version: v1.25.1 # renovate: datasource=custom.goreleaser depName=goreleaser/goreleaser packageName=goreleaser
args: build --single-target --snapshot --clean --output ./version
env:
GORELEASER_CURRENT_TAG: ${{ steps.draft_release.outputs.tag_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
with:
version: v1.25.1 # renovate: datasource=github-tags depName=goreleaser/goreleaser
version: v1.25.1 # renovate: datasource=custom.goreleaser depName=goreleaser/goreleaser packageName=goreleaser
args: release --skip=publish --clean
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
Expand Down

0 comments on commit 4a5f7ab

Please sign in to comment.