fix(ci): install Node.js before checkout action
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:
parent
803da596e1
commit
5f64b57266
1 changed files with 19 additions and 3 deletions
|
|
@ -21,7 +21,13 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: rust:latest
|
image: rust:latest
|
||||||
steps:
|
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
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
@ -45,7 +51,13 @@ jobs:
|
||||||
image: rust:latest
|
image: rust:latest
|
||||||
needs: lint
|
needs: lint
|
||||||
steps:
|
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
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
@ -72,7 +84,11 @@ jobs:
|
||||||
docker:
|
docker:
|
||||||
image: docker:dind
|
image: docker:dind
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Install Node.js
|
||||||
|
run: |
|
||||||
|
apk add --no-cache nodejs npm
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue