From 9bf5e40138756b05cea546414cde8c2d2a039bb9 Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Sat, 24 Jan 2026 01:37:02 +0100 Subject: [PATCH] fix: update nodejs --- .github/workflows/build-ubuntu.yml | 2 +- README.md | 2 +- linux/ubuntu/Dockerfile | 2 +- linux/ubuntu/scripts/act.sh | 2 +- linux/ubuntu/scripts/js.sh | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index 1a52f7f..eb8a90d 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -22,7 +22,7 @@ env: IMAGE_LABEL_REPO: ${{ github.repository }} SLUG: ${{ github.repository_owner }}/ubuntu DISTRO: ubuntu - NODE: '16 18 20' + NODE: '20 24' BUILD_REF: ${{ github.sha }} SKIP_TEST: false PUSH_GHCR: ${{ github.repository == (github.event.pull_request.head.repo.full_name || github.repository) && '1' || '' }} diff --git a/README.md b/README.md index 300f4fc..317c6d9 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ - `ghcr.io/catthehacker/ubuntu:runner-22.04` - `ghcr.io/catthehacker/ubuntu:runner-24.04` - `ghcr.io/catthehacker/ubuntu:runner-latest` -- [`/linux/ubuntu/js`](./linux/ubuntu/scripts/js.sh) - `ghcr.io/catthehacker/ubuntu:act-*` but with `js` tools installed (`yarn`, `nvm`, `node` v16/v18, `pnpm`, `grunt`, etc.) +- [`/linux/ubuntu/js`](./linux/ubuntu/scripts/js.sh) - `ghcr.io/catthehacker/ubuntu:act-*` but with `js` tools installed (`yarn`, `nvm`, `node` v20/v24, `pnpm`, `grunt`, etc.) - `ghcr.io/catthehacker/ubuntu:js-22.04` - `ghcr.io/catthehacker/ubuntu:js-24.04` - `ghcr.io/catthehacker/ubuntu:js-latest` diff --git a/linux/ubuntu/Dockerfile b/linux/ubuntu/Dockerfile index 2b18a7a..6fce849 100644 --- a/linux/ubuntu/Dockerfile +++ b/linux/ubuntu/Dockerfile @@ -11,7 +11,7 @@ ARG FROM_TAG # > Our custom ARGs # latest Node.js LTS versions -ARG NODE_VERSION="16 18" +ARG NODE_VERSION="20 24" ARG DISTRO=ubuntu ARG TYPE=act ARG RUNNER diff --git a/linux/ubuntu/scripts/act.sh b/linux/ubuntu/scripts/act.sh index 08d33f4..9d29815 100755 --- a/linux/ubuntu/scripts/act.sh +++ b/linux/ubuntu/scripts/act.sh @@ -130,7 +130,7 @@ for ver in "${NODE[@]}"; do wget "https://nodejs.org/download/release/latest-v${ver}.x/node-$VER-linux-$(node_arch).tar.xz" -O "node-$VER-linux-$(node_arch).tar.xz" tar -Jxf "node-$VER-linux-$(node_arch).tar.xz" --strip-components=1 -C "$NODEPATH" rm "node-$VER-linux-$(node_arch).tar.xz" - if [[ "${ver}" == "18" ]]; then # make this version the default (latest LTS) + if [[ "${ver}" == "24" ]]; then # make this version the default (latest LTS) sed "s|^PATH=|PATH=$NODEPATH/bin:|mg" -i /etc/environment fi export PATH="$NODEPATH/bin:$PATH" diff --git a/linux/ubuntu/scripts/js.sh b/linux/ubuntu/scripts/js.sh index e29a911..87b2871 100755 --- a/linux/ubuntu/scripts/js.sh +++ b/linux/ubuntu/scripts/js.sh @@ -20,8 +20,8 @@ echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' | tee printf "\n\tšŸ‹ Installed NVM šŸ‹\t\n" nvm --version -# node 16 and 18 are already installed in act-* -versions=("20") + +versions=("") JSON=$(wget -qO- https://nodejs.org/download/release/index.json | jq --compact-output) for V in "${versions[@]}"; do