diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index c87ff15..996cb01 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -20,7 +20,7 @@ env: IMAGE_LABEL_REPO: ${{ github.repository }} SLUG: ${{ github.repository_owner }}/ubuntu DISTRO: ubuntu - NODE: '16' + NODE: '16 18' BUILD_REF: ${{ github.sha }} SKIP_TEST: false @@ -141,7 +141,7 @@ jobs: ) - if: ${{ !env.SKIP_TEST }} - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: '^1.16' diff --git a/README.md b/README.md index e115656..380e245 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ - `ghcr.io/catthehacker/ubuntu:runner-20.04` - `ghcr.io/catthehacker/ubuntu:runner-22.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` v10/v12, `pnpm`, `grunt`, etc.) +- [`/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.) - `ghcr.io/catthehacker/ubuntu:js-20.04` - `ghcr.io/catthehacker/ubuntu:js-22.04` - `ghcr.io/catthehacker/ubuntu:js-latest` diff --git a/linux/ubuntu/Dockerfile b/linux/ubuntu/Dockerfile index af785ed..e927cfe 100644 --- a/linux/ubuntu/Dockerfile +++ b/linux/ubuntu/Dockerfile @@ -10,7 +10,8 @@ ARG FROM_IMAGE ARG FROM_TAG # > Our custom ARGs -ARG NODE_VERSION="12 16" +# latest Node.js LTS versions +ARG NODE_VERSION="16 18" ARG DISTRO=ubuntu ARG TYPE=act ARG RUNNER diff --git a/linux/ubuntu/scripts/act.sh b/linux/ubuntu/scripts/act.sh index 894ce1b..4bbe0a3 100755 --- a/linux/ubuntu/scripts/act.sh +++ b/linux/ubuntu/scripts/act.sh @@ -121,7 +121,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}" == "16" ]]; then + if [[ "${ver}" == "18" ]]; 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/helpers/etc-environment.sh b/linux/ubuntu/scripts/helpers/etc-environment.sh index 04daa5d..701cc8f 100755 --- a/linux/ubuntu/scripts/helpers/etc-environment.sh +++ b/linux/ubuntu/scripts/helpers/etc-environment.sh @@ -25,7 +25,7 @@ function replaceEtcEnvironmentVariable { variable_name="$1" variable_value="$2" - # modify /etc/environemnt in place by replacing a string that begins with variable_name + # modify /etc/environment in place by replacing a string that begins with variable_name # removed quotes for the docker env metadata reader sudo sed -i -e "s%^${variable_name}=.*$%${variable_name}=${variable_value}%" /etc/environment } @@ -74,10 +74,10 @@ function appendEtcEnvironmentPath { # /etc/environment # # TODO: there might be the others variables to be processed in the same way as "PATH" variable -# ie MANPATH, INFOPATH, LD_*, etc. In the current implementation the values from /etc/evironments +# ie MANPATH, INFOPATH, LD_*, etc. In the current implementation the values from /etc/environment # replace the values of the current environment function reloadEtcEnvironment { - # add `export ` to every variable of /etc/environemnt except PATH and eval the result shell script + # add `export ` to every variable of /etc/environment except PATH and eval the result shell script eval "$(grep -v '^PATH=' /etc/environment | sed -e 's%^%export %')" # handle PATH specially etc_path=$(getEtcEnvironmentVariable PATH) diff --git a/linux/ubuntu/scripts/js.sh b/linux/ubuntu/scripts/js.sh index 7e8ebcb..5cf72b1 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 12 and 16 are installed already in act-* -versions=("14") +# node 16 and 18 are already installed in act-* +versions=("20") JSON=$(wget -qO- https://nodejs.org/download/release/index.json | jq --compact-output) for V in "${versions[@]}"; do