remodelled config

This commit is contained in:
sujiba 2024-05-27 15:43:23 +02:00
parent 1329a3d8c9
commit d32461302f
4 changed files with 36 additions and 29 deletions

View file

@ -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 }}
GITHUB_COM_TOKEN: ${{ secrets.GH_TOKEN }}

View file

@ -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)
- [naoalb renovate config](https://code.naoalb.org/naoalb-Infrastructure/renovate-config)
- [augmentedmind.de](https://www.augmentedmind.de/2023/07/30/renovate-bot-introduction/)

8
config.js Normal file
View file

@ -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,
};

View file

@ -8,33 +8,22 @@
":maintainLockFilesWeekly",
"schedule:automergeDaily"
],
"semanticCommits": "enabled",
"automerge": true,
"automergeType": "pr",
"prConcurrentLimit": 5,
"labels": ["dependency"],
"autodiscover": true,
"gitAuthor": "renovate-bot <renovate@bot.local>",
"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=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\sENV .*?_VERSION=\"(?<currentValue>.*)\"\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
},
{
"customType": "regex",
"fileMatch": [".*\\.yml$", ".*\\.yaml$"],
"matchStrings": [
"#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s*.*?_version:\\s+(?<currentValue>.*)\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
}
]
"minor": {
"automerge": true,
"stabilityDays": 3,
"prCreation": "not-pending"
},
"patch": { "automerge": true },
"digest": { "automerge": true }
}