Fix CI container: set global PATH for cargo/node across steps
Some checks failed
Release / build-and-release (push) Failing after 18m25s

Docker container steps don't share shell state. Set PATH at job level
to include /root/.cargo/bin and remove per-step source cargo/env.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
le king fu 2026-02-28 15:52:11 -05:00
parent 9ab8d3d7df
commit 90f095a8cf

View file

@ -9,28 +9,26 @@ jobs:
build-and-release: build-and-release:
runs-on: ubuntu runs-on: ubuntu
container: ubuntu:22.04 container: ubuntu:22.04
env:
PATH: /root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
steps: steps:
- name: Install base tools - name: Install base tools and runtimes
run: | run: |
apt-get update apt-get update
apt-get install -y curl wget git sudo ca-certificates apt-get install -y curl wget git sudo ca-certificates gnupg
# Install Node.js 20
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Setup environment
run: |
# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs apt-get install -y nodejs
# Install Rust # Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustc --version rustc --version
cargo --version cargo --version
node --version node --version
npm --version npm --version
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Install Linux dependencies - name: Install Linux dependencies
run: | run: |
apt-get install -y build-essential libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf jq libssl-dev xdg-utils apt-get install -y build-essential libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf jq libssl-dev xdg-utils
@ -38,7 +36,6 @@ jobs:
- name: Install Windows cross-compile dependencies - name: Install Windows cross-compile dependencies
run: | run: |
apt-get install -y lld llvm clang nsis apt-get install -y lld llvm clang nsis
source "$HOME/.cargo/env"
rustup target add x86_64-pc-windows-msvc rustup target add x86_64-pc-windows-msvc
cargo install --locked cargo-xwin cargo install --locked cargo-xwin
@ -50,7 +47,6 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: | run: |
source "$HOME/.cargo/env"
npx tauri build npx tauri build
- name: Build Tauri Windows - name: Build Tauri Windows
@ -58,7 +54,6 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: | run: |
source "$HOME/.cargo/env"
npx tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc npx tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc
- name: Collect release files - name: Collect release files