From d32461302f438d1650fef74b8daa37f34127e740 Mon Sep 17 00:00:00 2001 From: sujiba Date: Mon, 27 May 2024 15:43:23 +0200 Subject: [PATCH] remodelled config --- .forgejo/workflows/renovate.yaml | 8 +++----- README.md | 18 +++++++++++++++--- config.js | 8 ++++++++ default.json | 31 ++++++++++--------------------- 4 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 config.js diff --git a/.forgejo/workflows/renovate.yaml b/.forgejo/workflows/renovate.yaml index 50a94c4..cca8772 100644 --- a/.forgejo/workflows/renovate.yaml +++ b/.forgejo/workflows/renovate.yaml @@ -2,7 +2,7 @@ name: renovate on: schedule: - - cron: "@daily" + - cron: "@hourly" push: branches: - main @@ -15,10 +15,8 @@ jobs: - uses: actions/checkout@v4 - run: renovate env: - RENOVATE_CONFIG_FILE: "/workspace/homelab/renovate-config/config.json" # replace it with your config.js path - RENOVATE_PLATFORM: gitea - RENOVATE_ENDPOINT: https://git.smail.koeln + RENOVATE_CONFIG_FILE: "/workspace/homelab/renovate-config/config.js" # replace it with your config.js path LOG_LEVEL: "debug" RENOVATE_CONFIG_MIGRATION: "true" # ensure all repositories receive config migration PRs RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} - GITHUB_COM_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file + GITHUB_COM_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/README.md b/README.md index 1eb4df2..d8d177d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # renovate-config +- [renovate-config](#renovate-config) + - [requirements](#requirements) + - [additional](#additional) + - [acknowledgments](#acknowledgments) + + To host the renovate config. - `config.js` holds the self-hosted Renovate configuration so that Renovate knows what and how it should process. @@ -7,7 +13,7 @@ To host the renovate config. - `default.json` holds the basic config for all repositories. It extends the presets by the renovate project defined in `renovate-schema.json`. - Each repository can extend/alter this config by adding a `renovate.json` file to the root of the repository. -# requirements +## requirements 1. Create a new bot account e.g. renovate-bot. 2. Create a personal access token (*PAT*) for your renovate-bot account. 3. Create a new organisation e.g. homelab. @@ -15,8 +21,14 @@ To host the renovate config. 5. Add renovate-bot *PAT* as a secret (*RENOVATE_TOKEN*) in the organization. 6. renovate-bot can now manage your repositories in the organization. -# acknowledgments +### additional + +1. GitHub Access Token (read only) +2. Docker.io login credentials + +## acknowledgments - [renovatebot docs](https://docs.renovatebot.com/modules/platform/gitea/) - [gitea renovate config](https://gitea.com/gitea/renovate-config) -- [naoalb renovate config](https://code.naoalb.org/naoalb-Infrastructure/renovate-config) \ No newline at end of file +- [naoalb renovate config](https://code.naoalb.org/naoalb-Infrastructure/renovate-config) +- [augmentedmind.de](https://www.augmentedmind.de/2023/07/30/renovate-bot-introduction/) diff --git a/config.js b/config.js new file mode 100644 index 0000000..d4263ed --- /dev/null +++ b/config.js @@ -0,0 +1,8 @@ +module.exports = { + "endpoint": "https://git.smail.koeln/api/v1", + "gitAuthor": "Renovate Bot", + "platform": "gitea", + "onboardingConfigFileName": "renovate.json", + "autodiscover": true, + "optimizedForDisabled": true, +}; \ No newline at end of file diff --git a/default.json b/default.json index a2645d1..165b46b 100644 --- a/default.json +++ b/default.json @@ -8,33 +8,22 @@ ":maintainLockFilesWeekly", "schedule:automergeDaily" ], + "semanticCommits": "enabled", + "automerge": true, + "automergeType": "pr", "prConcurrentLimit": 5, "labels": ["dependency"], "autodiscover": true, "gitAuthor": "renovate-bot ", "platform": "gitea", - "automerge": true, "ignoreErrors": true, "rebaseWhen": "conflicted", - "automergeType": "pr", "major": { "automerge": false }, - "semanticCommits": "enabled", - "customManagers": [ - { - "customType": "regex", - "fileMatch": ["^Dockerfile"], - "matchStrings": [ - "#\\s*renovate:\\s*datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?\\sENV .*?_VERSION=\"(?.*)\"\\s" - ], - "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}" - }, - { - "customType": "regex", - "fileMatch": [".*\\.yml$", ".*\\.yaml$"], - "matchStrings": [ - "#\\s*renovate:\\s*datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?\\s*.*?_version:\\s+(?.*)\\s" - ], - "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}" - } - ] + "minor": { + "automerge": true, + "stabilityDays": 3, + "prCreation": "not-pending" + }, + "patch": { "automerge": true }, + "digest": { "automerge": true } } \ No newline at end of file