fix(ci): install Node.js before checkout action
Some checks failed
Lint and Build / Lint (push) Failing after 34s
Lint and Build / Build (push) Has been skipped
Lint and Build / Docker Build (push) Has been skipped

The CI was failing because the rust:latest container doesn't have
Node.js, but the actions/checkout@v4 action requires Node.js to run.

Error: 'exec: node: executable file not found in /home/asoliver/.local/bin/:/home/asoliver/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/asoliver/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin'

Solution:
- Install Node.js before running checkout action
- For rust:latest containers: use NodeSource repository
- For docker:latest containers: use apk package manager

This allows the GitHub Actions checkout action to work in Forgejo.
This commit is contained in:
goose 2026-03-12 08:45:31 -03:00
parent 803da596e1
commit 5f64b57266

View file

@ -21,7 +21,13 @@ jobs:
container:
image: rust:latest
steps:
- name: Checkout code
- name: Install Node.js
run: |
apt-get update && apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
@ -45,7 +51,13 @@ jobs:
image: rust:latest
needs: lint
steps:
- name: Checkout code
- name: Install Node.js
run: |
apt-get update && apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
@ -72,7 +84,11 @@ jobs:
docker:
image: docker:dind
steps:
- name: Checkout code
- name: Install Node.js
run: |
apk add --no-cache nodejs npm
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image