From 19d4cbce27f5536c6997df7e550404e8a74a47fc Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Sun, 1 Mar 2026 17:03:17 -0800 Subject: [PATCH] Use shell-based check-before-install for all build jobs Replace JS-based GitHub Actions (dtolnay/rust-toolchain, actions/setup-node) in the Linux job with shell commands that check if Rust and Node.js are already present before installing. All three jobs (Linux, macOS, Windows) now use the same pattern: skip installation if the tool is already available on the runner. Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/build-app.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/build-app.yml b/.gitea/workflows/build-app.yml index 897c848..34c8479 100644 --- a/.gitea/workflows/build-app.yml +++ b/.gitea/workflows/build-app.yml @@ -61,17 +61,29 @@ jobs: xdg-utils - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable - - - name: Rust cache - uses: swatinem/rust-cache@v2 - with: - workspaces: "./app/src-tauri -> target" + run: | + if command -v rustup &>/dev/null; then + echo "Rust already installed: $(rustc --version)" + rustup update stable + rustup default stable + else + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + . "$HOME/.cargo/env" + fi + rustc --version + cargo --version - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: "22" + run: | + if command -v node &>/dev/null; then + echo "Node.js already installed: $(node --version)" + else + echo "Installing Node.js 22..." + curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - + sudo apt-get install -y nodejs + fi + node --version + npm --version - name: Install frontend dependencies working-directory: ./app