https://github.com/raphiz/renovate-devshell
https://github.com/raphiz/renovate-devshell
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/raphiz/renovate-devshell
- Owner: raphiz
- License: unlicense
- Created: 2025-03-11T15:41:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-20T07:17:01.000Z (over 1 year ago)
- Last Synced: 2025-03-20T08:23:10.733Z (over 1 year ago)
- Language: Shell
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Renovate for Nix Devshells
Run and configure [Renovate](https://github.com/renovatebot/renovate) via devshell.
This setup allows Renovate to run as an on-demand or scheduled CI job without requiring a continuously running server.
If you're using NixOS, consider the [NixOS Renovate module](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modules/services/misc/renovate.nix), as it runs Renovate as a continuously running systemd service.
This project also includes `renovate-preview`, a wrapper around Renovate that prints pending updates in a human-readable format.
## Installation
Add this repository as a flake input:
```nix
inputs.renovate.url = "github:raphiz/renovate-devshell";
```
## Usage
Import the module into your [devenv.sh](https://devenv.sh/) or [devshell.nix](https://github.com/numtide/devshell) setup:
```nix
imports = [
inputs.renovate.modules.default
];
renovate.enable = true;
renovate.settings = {
# Your Renovate configuration, for example:
# platform = "gitea";
# endpoint = "https://git.example.com";
};
```
This setup:
- Adds the `renovate` and `renovate-preview` commands to your `$PATH`.
- Automatically sets the `RENOVATE_CONFIG_FILE` environment variable with the provided settings.
> [!NOTE]
> It's recommended to use a dedicated shell environment for Renovate to reduce the closure size for both CI jobs and local development.
Ensure your project includes a [`renovate.json`](https://docs.renovatebot.com/getting-started/installing-onboarding/#configuration-location) file.
Preview pending updates with:
```bash
renovate-preview
```
### Running Renovate in CI
To integrate Renovate into your CI system, [configure Renovate settings](https://docs.renovatebot.com/examples/self-hosting/) according to your needs.
At a minimum, configure the [platform-specific](https://docs.renovatebot.com/modules/platform/) settings.
For sensitive information such as tokens (`RENOVATE_GITHUB_COM_TOKEN`, `RENOVATE_PASSWORD`, `RENOVATE_TOKEN`), use environment variables and your CI's secret management system.
### Supported CI Systems
This approach supports any CI system, including:
- GitHub Actions
- GitLab CI/CD
- Jenkins
## `renovate-preview`
The `renovate-preview` CLI provides a simple, readable summary of available updates.
In most cases, you can run the command without additional parameters:

For more details, run:
```bash
renovate-preview --help
```
You can run this preview script independently of the devshell module by executing:
```nix
nix run github:raphiz/renovate-devshell#renovate-preview -- --no-validate
```
## Examples
### GitHub Action
...to be done...
## Contributing
Contributions are welcome!
Feel free to open an issue or submit a pull request.