Fix CI: install Node.js so actions/checkout can run in the container
The git fix alone got further, but actions/checkout@v4 (and later, actions/upload-artifact@v4) are Node-based actions — Gitea Actions execs their JS bundle with the "node" binary from inside the job's own container rather than injecting a runtime of its own, and vbatts/slackware:15.0 has no nodejs package anywhere on the official Slackware mirror. Install a pinned, checksum-verified Node.js release straight from nodejs.org in the same "Install git" step, matching the existing Go/Rust bootstrap style in setup-slackware-buildenv.sh. Verified end-to-end (node --version succeeds after a fresh install) in vbatts/slackware:15.0 on the actual runner host. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,8 +60,19 @@ on:
|
||||
# resolve everything from the same prioritized repo set (patches over
|
||||
# main, see /etc/slackpkg/slackpkg.conf's PRIORITY) keeps every package on
|
||||
# this image on a mutually consistent version set.
|
||||
#
|
||||
# actions/checkout and actions/upload-artifact are both Node-based actions
|
||||
# — Gitea Actions execs their JS bundle with the "node" binary found
|
||||
# inside the job's own container, it does not inject a runtime of its
|
||||
# own. Slackware has no nodejs package at all (checked: not in any of the
|
||||
# main/extra/pasture/testing repos), so the "Install git" step also
|
||||
# installs a pinned, checksum-verified Node.js release directly from
|
||||
# nodejs.org — the same style already used for Go/Rust in
|
||||
# scripts/ci/setup-slackware-buildenv.sh.
|
||||
env:
|
||||
SLACKWARE_IMAGE: "vbatts/slackware:15.0"
|
||||
NODE_VERSION: "20.20.2"
|
||||
NODE_SHA256: "df770b2a6f130ed8627c9782c988fda9669fa23898329a61a871e32f965e007d"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -72,7 +83,7 @@ jobs:
|
||||
outputs:
|
||||
artifact-name: ${{ steps.artifact-name.outputs.value }}
|
||||
steps:
|
||||
- name: Install git (needed before actions/checkout can run)
|
||||
- name: Install git and Node.js (needed before actions/checkout can run)
|
||||
run: |
|
||||
set -eu
|
||||
command -v tar > /dev/null || (echo "!! base image is missing tar — see SLACKWARE_IMAGE in this workflow" && exit 1)
|
||||
@@ -102,6 +113,20 @@ jobs:
|
||||
|
||||
git --version
|
||||
|
||||
# curl isn't installed until scripts/ci/setup-slackware-buildenv.sh
|
||||
# runs, later — use wget (present in the base image) here instead.
|
||||
# wget does not consult the system CA bundle on its own (unlike
|
||||
# curl/git, which respect CURL_CA_BUNDLE/GIT_SSL_CAINFO), so pass
|
||||
# it explicitly via --ca-certificate.
|
||||
node_tarball="node-v${NODE_VERSION}-linux-x64.tar.xz"
|
||||
wget -q --tries=3 --ca-certificate=/etc/ssl/certs/ca-certificates.crt \
|
||||
-O "/tmp/$node_tarball" "https://nodejs.org/dist/v${NODE_VERSION}/$node_tarball"
|
||||
echo "${NODE_SHA256} /tmp/$node_tarball" | sha256sum -c -
|
||||
mkdir -p /usr/local/lib/nodejs
|
||||
tar -xf "/tmp/$node_tarball" -C /usr/local/lib/nodejs
|
||||
echo "/usr/local/lib/nodejs/node-v${NODE_VERSION}-linux-x64/bin" >> "$GITHUB_PATH"
|
||||
"/usr/local/lib/nodejs/node-v${NODE_VERSION}-linux-x64/bin/node" --version
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Slackware build environment
|
||||
|
||||
Reference in New Issue
Block a user