Install node on runner for GitHub Actions compatibility

The Gitea runner needs node to execute actions like checkout@v4.
Install node 20.x from nodesource if not already present.
This commit is contained in:
forbes
2026-01-26 12:31:18 -06:00
parent 0760f977d8
commit 90db886359
2 changed files with 25 additions and 15 deletions

View File

@@ -24,15 +24,20 @@ jobs:
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion"
steps:
- name: Checkout repository
- name: Install node if needed
shell: bash
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git init
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git fetch origin --depth=1 "$GITHUB_SHA"
git checkout FETCH_HEAD
git submodule update --init --recursive
if ! command -v node &> /dev/null; then
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
fi
node --version
- name: Checkout repository
uses: https://github.com/actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install pixi if needed
shell: bash

View File

@@ -29,16 +29,21 @@ jobs:
MAKE_INSTALLER: "true"
steps:
- name: Checkout repository
- name: Install node if needed
shell: bash
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git init
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git fetch origin --tags
git fetch origin --depth=1 "$GITHUB_SHA"
git checkout FETCH_HEAD
git submodule update --init --recursive
if ! command -v node &> /dev/null; then
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
fi
node --version
- name: Checkout repository
uses: https://github.com/actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- name: Install pixi if needed
shell: bash