From a426c29b3e346ea000d7db51a48fadf83eb78aac Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Tue, 9 Jan 2024 11:45:46 +0100 Subject: [PATCH] Bump node version update to v20 (#2184) When updating node to v20 in https://github.com/dfinity/internet-identity/pull/2178 I forgot to bump the node update job to use v20 instead of v18. --- .github/workflows/update-node.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-node.yml b/.github/workflows/update-node.yml index 3620faeabd..c41c5eecc5 100644 --- a/.github/workflows/update-node.yml +++ b/.github/workflows/update-node.yml @@ -20,10 +20,10 @@ jobs: current_node_version=$(cat ./.node-version) echo "current node version '$current_node_version'" - # We look for the last released version that starts with "prefix", and then drop the - # "v" prefix (which .node-version doesn't use) + # We look for the last released version that starts with the currently used major + # version, and then drop the "v" prefix (which .node-version doesn't use) latest_node_version=$(curl -sSl https://nodejs.org/download/release/index.json \ - | jq -cMr --arg prefix v18 \ + | jq -cMr --arg prefix "v${current_node_version%%.*}" \ 'sort_by(.data) | [.[] | select(.lts) | select(.version | startswith($prefix))][0] | .version | sub("^v"; "")') echo "latest node version '$latest_node_version'"