From 4a5f7ab586ef121eb3860fee3f7141b33df33873 Mon Sep 17 00:00:00 2001 From: kvanzuijlen <8818390+kvanzuijlen@users.noreply.github.com> Date: Thu, 16 May 2024 00:51:15 +0200 Subject: [PATCH] chore: improved renovate configuration for goreleaser version --- .github/renovate.json5 | 24 ++++++++++++++++-------- .github/workflows/build.yaml | 2 +- .github/workflows/ci.yaml | 2 +- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 84f0b47..6b7091b 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -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="(?.*)"'], - depNameTemplate: "gcr.io/distroless/static", - currentValueTemplate: "nonroot", - datasourceTemplate: "docker", }, { customType: "regex", fileMatch: "(^|\\/)(?:workflow-templates|\\.github\\/(?:workflows|actions))\\/.+\\.ya?ml$", matchStrings: [ - "version: (?.*?)\\s+# renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?\\s", + "version: (?.*?)\\s+# renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?( 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", } diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f1b575e..2cc7f55 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 51143f6..ac50d0c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 }}