ci: install Node.js in Codeberg container before JS actions

The golang:1.22-bookworm container has no node binary and Codeberg's
runner does not inject one, so checkout/forgejo-release failed with
'node: not found'. Add a pre-checkout run step (which executes via the
container shell and needs no node itself) to apt-install nodejs before
the JS-based actions run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-07-08 08:58:40 +03:00
parent 9866673bab
commit 48622a99c2
+12
View File
@@ -26,6 +26,18 @@ jobs:
container: container:
image: golang:1.22-bookworm image: golang:1.22-bookworm
steps: steps:
- name: Provide Node.js for JS actions
# golang:1.22-bookworm ships no Node, and Codeberg's runner does not
# inject one, so JS actions (checkout, forgejo-release) fail with
# "node: not found". A run step executes through the container shell and
# needs no Node itself, so it can install Node before those actions run.
# (If a "node version" error ever appears, swap Debian's nodejs 18 for a
# NodeSource node 20 install.)
run: |
apt-get update
apt-get install -y --no-install-recommends nodejs
command -v node || ln -s "$(command -v nodejs)" /usr/local/bin/node
- name: Checkout - name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4 uses: https://code.forgejo.org/actions/checkout@v4