Skip to content

Commit

Permalink
chore: Change Renovate configuration and change project files for new…
Browse files Browse the repository at this point in the history
… Renovate
  • Loading branch information
oxyno-zeta committed Sep 23, 2024
1 parent 7fd1750 commit 9bcc908
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 12 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
branches-ignore:
- "github-pages"
pull_request: {}
env:
# renovate: datasource=github-tags depName=golangci/golangci-lint
GOLANGCI_LINT_VERSION: "v1.60.3"
GOLANG_VERSION: "^1.22.0"
jobs:
changes:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -40,11 +44,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.22.0"
go-version: ${{ env.GOLANG_VERSION }}
- uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.60.3
version: ${{ env.GOLANGCI_LINT_VERSION }}

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down Expand Up @@ -75,7 +79,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.22.0"
go-version: ${{ env.GOLANG_VERSION }}
- run: make code/build
build-cross:
if: |
Expand All @@ -93,7 +97,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.22.0"
go-version: ${{ env.GOLANG_VERSION }}
- run: make code/build-cross
test:
if: |
Expand All @@ -108,7 +112,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.22.0"
go-version: ${{ env.GOLANG_VERSION }}
- run: |
if [ -f /usr/local/bin/dockerize ]; then
echo "dockerize found; skipping installation";
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
branches-ignore:
- "github-pages"
pull_request: {}
env:
# renovate: datasource=docker depName=squidfunk/mkdocs-material
MKDOCS_MATERIAL_VERSION: "9.5.15"
# renovate: datasource=pypi depName=mkdocs-awesome-pages-plugin
MKDOCS_AWESOME_PAGES_PLUGIN_VERSION: "2.8.0"
jobs:
changes:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -34,8 +39,8 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material==9.5.15
- run: pip install mkdocs-awesome-pages-plugin==2.8.0
- run: pip install mkdocs-material==${{ env.MKDOCS_MATERIAL_VERSION }}
- run: pip install mkdocs-awesome-pages-plugin==${{ env.MKDOCS_AWESOME_PAGES_PLUGIN_VERSION }}
- run: mkdocs build
docs-deploy:
needs:
Expand All @@ -50,6 +55,6 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material==9.5.15
- run: pip install mkdocs-awesome-pages-plugin==2.8.0
- run: pip install mkdocs-material==${{ env.MKDOCS_MATERIAL_VERSION }}
- run: pip install mkdocs-awesome-pages-plugin==${{ env.MKDOCS_AWESOME_PAGES_PLUGIN_VERSION }}
- run: mkdocs gh-deploy --force
5 changes: 4 additions & 1 deletion Dockerfile.docs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
FROM squidfunk/mkdocs-material:9.5.15

RUN pip install mkdocs-awesome-pages-plugin==2.8.0
# renovate: datasource=pypi depName=mkdocs-awesome-pages-plugin
ENV MKDOCS_AWESOME_PAGES_PLUGIN_VERSION="2.8.0"

RUN pip install mkdocs-awesome-pages-plugin==${MKDOCS_AWESOME_PAGES_PLUGIN_VERSION}
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ HAS_MOCKGEN:=$(shell command -v mockgen;)
HAS_GOTESTSUM:=$(shell command -v gotestsum;)
HAS_FIELDALIGNMENT:=$(shell command -v fieldalignment;)

#
## Tool versions
#

# ? Note: Go install versions are inline because renovate can manage them like that.

# renovate: datasource=github-tags depName=golangci/golangci-lint
GOLANGCI_LINT_VERSION := "v1.60.3"

.DEFAULT_GOAL := code/lint

#############
Expand Down Expand Up @@ -175,7 +184,7 @@ ifndef HAS_GOLANGCI_LINT
ifndef HAS_CURL
$(error You must install curl)
endif
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.60.3
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin $(GOLANGCI_LINT_VERSION)
endif
ifndef HAS_GIT
$(error You must install Git)
Expand Down
46 changes: 45 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,48 @@
{
"extends": ["config:base"],
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
":rebaseStalePrs",
":semanticCommits",
":semanticCommitScope(deps)"
],
"configMigration": true,
"labels": ["renovate"],
"pre-commit": {
"enabled": true
},
"vulnerabilityAlerts": {
"enabled": true,
"labels": ["vulnerability-alert"]
},
"packageRules": [
{
"groupName": "mkdocs",
"groupSlug": "mkdocs",
"matchPackageNames": ["mkdocs-material", "squidfunk/mkdocs-material"]
},
{
"groupName": "golangci/golangci-lint",
"groupSlug": "golangci_golangci_lint",
"matchPackageNames": ["golangci/golangci-lint"]
}
],
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^Makefile$", "^.github/workflows/.*\\.yml"],
"matchStrings": [
"#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s.*?_VERSION\\s*[:=]+\\s*\"(?<currentValue>.*)\"\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
},
{
"fileMatch": ["^Makefile$"],
"matchStrings": [
"go install (?<depName>[^@]+?)@(?<currentValue>[0-9.-a-zA-Z]+)"
],
"datasourceTemplate": "go"
}
],
"ignoreDeps": ["github.com/aws/aws-sdk-go"]
}

0 comments on commit 9bcc908

Please sign in to comment.