From 36ba0bc39add16a360a1b81fdfc52cb36d91c1f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Wed, 25 Feb 2026 20:03:14 +0100 Subject: [PATCH] n8n: auto update to highest stable version Previously it updated to the version that GitHub marked as latest, but this could be a few versions behind sometimes. --- pkgs/by-name/n8/n8n/update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/n8/n8n/update.sh b/pkgs/by-name/n8/n8n/update.sh index 4b1a8961cf22..bcf02c247da9 100755 --- a/pkgs/by-name/n8/n8n/update.sh +++ b/pkgs/by-name/n8/n8n/update.sh @@ -2,5 +2,6 @@ #!nix-shell --pure -i bash -p bash curl jq nix-update cacert git set -euo pipefail -new_version="$(curl -s "https://api.github.com/repos/n8n-io/n8n/releases/latest" | jq --raw-output '.tag_name | ltrimstr("n8n@")')" +new_version="$(curl -s "https://api.github.com/repos/n8n-io/n8n/releases?per_page=30" | \ + jq --raw-output 'map(select(.prerelease | not) | .tag_name) | sort | last | ltrimstr("n8n@")')" nix-update n8n --version "$new_version"