Last active
September 24, 2025 14:04
-
-
Save meise/14c9cd601e2bbe35ca891438575b3b86 to your computer and use it in GitHub Desktop.
Renovate customDatasource to get only nginx stable version updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # renovate: datasource=custom.nginx depName=nginx | |
| ARG NGINX_VERSION=1.26.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | |
| "customManagers": [ | |
| { | |
| "customType": "regex", | |
| "managerFilePatterns": ["Dockerfile"], | |
| "datasourceTemplate": "custom.nginx", | |
| "matchStrings": [ | |
| "#\\s*renovate:\\s*(datasource=(?<datasource>.*?) )?depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s*.*?_VERSION=(?<currentValue>.*)" | |
| ] | |
| } | |
| ], | |
| "customDatasources": { | |
| "nginx": { | |
| "defaultRegistryUrlTemplate": "https://nginx.org/en/download.html", | |
| "format": "html", | |
| "transformTemplates": [ | |
| "{ \"releases\": [ $map(releases.$sift(function($v, $k) {$v ~> /tar.gz$/}), function($v) { { \"version\": $match($v.version, /-(\\d+\\.\\d+\\.\\d+)/ ).groups[0], \"changelogUrl\": \"https://nginx.org/en/CHANGES-\" & $string($match($v.version, /-(\\d+\\.\\d+)/ ).groups[0]) } } )[1] ] }" | |
| ] | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment