diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index d433f2d..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "gomod" - directory: "/" - schedule: - interval: "monthly" - - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "monthly" diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e46635a..cc66503 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - go: [ '1.20', '1.19' ] + go: [stable, oldstable] steps: - uses: actions/checkout@v6 @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - go: [ '1.20', '1.19' ] + go: [stable, oldstable] steps: - uses: actions/checkout@v6 @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - go: [ '1.20', '1.19' ] + go: [stable, oldstable] steps: - uses: actions/checkout@v6 @@ -59,7 +59,8 @@ jobs: - name: Run staticcheck uses: dominikh/staticcheck-action@v1.4.0 with: - version: "2023.1.3" + # renovate: datasource=github-releases depName=dominikh/go-tools + version: "2026.2.2" install-go: false cache-key: ${{ matrix.go }} @@ -68,7 +69,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - go: [ '1.20', '1.19' ] + go: [stable, oldstable] # See https://docs.github.com/en/actions/using-containerized-services/creating-redis-service-containers services: diff --git a/Makefile b/Makefile index 902ffc1..f631d4a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ .DEFAULT_GOAL := help +# renovate: datasource=github-releases depName=dominikh/go-tools +STATICCHECK_VERSION := 2026.2.2 + .PHONY: help help: ## Outputs the help. @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' @@ -18,7 +21,7 @@ fmt: ## Runs go fmt (to check for go coding guidelines). .PHONY: staticcheck staticcheck: ## Runs static analysis to prevend bugs, foster code simplicity, performance and editor integration. - go get -u honnef.co/go/tools/cmd/staticcheck + go install honnef.co/go/tools/cmd/staticcheck@$(STATICCHECK_VERSION) staticcheck ./... .PHONY: all diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..4402ed4 --- /dev/null +++ b/renovate.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:best-practices" + ], + "timezone": "Europe/Berlin", + "schedule": [ + "* 0-4 * * 1" + ], + "semanticCommits": "disabled", + "postUpdateOptions": [ + "gomodTidy" + ], + "customManagers": [ + { + "customType": "regex", + "description": "Update the staticcheck release passed to dominikh/staticcheck-action, which the github-actions manager does not read", + "managerFilePatterns": [ + "/^\\.github/workflows/.+\\.ya?ml$/" + ], + "matchStrings": [ + "# renovate: datasource=(?[a-z-]+?) depName=(?[^\\s]+?)\\s+version: \"(?[^\"]+)\"" + ], + "versioningTemplate": "regex:^(?\\d+)\\.(?\\d+)(\\.(?\\d+))?$" + }, + { + "customType": "regex", + "description": "Update the staticcheck release installed by the Makefile, so local runs always match CI", + "managerFilePatterns": [ + "/^Makefile$/" + ], + "matchStrings": [ + "# renovate: datasource=(?[a-z-]+?) depName=(?[^\\s]+?)\\s+STATICCHECK_VERSION := (?\\S+)" + ], + "versioningTemplate": "regex:^(?\\d+)\\.(?\\d+)(\\.(?\\d+))?$" + } + ], + "packageRules": [ + { + "description": "Batch routine GitHub Actions updates into one weekly pull request, but keep major bumps separate because they usually need workflow changes", + "matchManagers": ["github-actions"], + "matchUpdateTypes": ["minor", "patch", "digest", "pin"], + "groupName": "GitHub Actions" + } + ] +}