From 90db8863597ff24e35765858dd17610ae81afed0 Mon Sep 17 00:00:00 2001 From: forbes Date: Mon, 26 Jan 2026 12:31:18 -0600 Subject: [PATCH] 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. --- .gitea/workflows/build.yml | 19 ++++++++++++------- .gitea/workflows/release.yml | 21 +++++++++++++-------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index f80813ac49..b9829df0d6 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -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 diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 50bf301727..7efed94061 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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