From c9d07977626548fc6e42d350029ac9b76f22947c Mon Sep 17 00:00:00 2001 From: Alexander Grabowski Date: Thu, 6 Nov 2025 13:18:54 +0700 Subject: [PATCH] Upload files to "/" --- .gitignore | 25 +++++++++++++++++++++++++ README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ config.js | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 config.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ecbd41e --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# Node modules (if testing locally) +node_modules/ + +# Environment variables +.env +.env.local + +# Renovate cache +.cache/ +cache/ + +# Logs +*.log +logs/ + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db diff --git a/README.md b/README.md new file mode 100644 index 0000000..cc0c6ee --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# Renovate Config Repository Example + +This directory contains example files for creating a separate `renovate-config` repository that will run Renovate Bot centrally for all your repositories. + +## Quick Start + +1. Create a new repository called `renovate-config` on your Gitea instance +2. Copy these files to that repository: + ``` + renovate-config/ + ├── config.js + ├── .gitea/ + │ └── workflows/ + │ └── renovate.yml + ├── README.md + └── .gitignore + ``` + +3. Follow the setup instructions in [`../RENOVATE.md`](../RENOVATE.md) + +## Files Included + +### config.js +Main Renovate configuration file that defines: +- Platform (gitea) +- API endpoint +- Repository discovery (autodiscover B4L/*) +- Rate limiting +- Caching + +### .gitea/workflows/renovate.yml +Gitea Actions workflow that: +- Runs daily at 2 AM UTC +- Uses official Renovate container +- Can be triggered manually +- Reads config.js for settings + +### README.md +Documentation for the renovate-config repository explaining setup and usage. + +## Important Notes + +- This is a **template** - copy to a new repository, don't use in place +- Edit `config.js` to match your Gitea endpoint +- Edit `autodiscoverFilter` to match your organization/user +- Add `RENOVATE_TOKEN` as repository secret +- Optionally add `GITHUB_TOKEN` for GitHub releases + +## See Full Documentation + +For complete setup instructions, see: +- [RENOVATE.md](../RENOVATE.md) - Full Renovate documentation +- [Official Gitea Tutorial](https://about.gitea.com/resources/tutorials/use-gitea-and-renovate-bot-to-automatically-monitor-software-packages) diff --git a/config.js b/config.js new file mode 100644 index 0000000..c94899c --- /dev/null +++ b/config.js @@ -0,0 +1,39 @@ +module.exports = { + // Gitea platform configuration + platform: 'gitea', + endpoint: 'https://git.b4l.co.th/api/v1', + gitAuthor: 'Renovate Bot ', + + // Authentication + token: process.env.RENOVATE_TOKEN, + + // GitHub token for accessing GitHub releases (optional but recommended) + hostRules: [ + { + hostType: 'github', + token: process.env.GITHUB_TOKEN, + } + ], + + // Repository discovery + autodiscover: true, + autodiscoverFilter: ['B4L/*'], // Adjust to your organization/user + + // Or specify repositories explicitly: + // repositories: ['B4L/vintage-collection'], + + // Configuration + onboardingConfigFileName: 'renovate.json', + requireConfig: 'optional', // Allow repos without renovate.json + + // Performance optimization + optimizeForDisabled: true, + + // Rate limiting + prConcurrentLimit: 5, + prHourlyLimit: 2, + + // Caching + cacheDir: '/tmp/renovate/cache', + repositoryCache: 'enabled', +};