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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user