From b795e27251aa93ec6cb20f347d04230bc6b1c991 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Sun, 1 Mar 2026 17:16:45 -0800 Subject: [PATCH] Fix Linux build PATH and add ARM64 container support Linux app build: cargo was not in PATH for subsequent steps after shell-based install. Fixed by adding $HOME/.cargo/bin to GITHUB_PATH (persists across steps) and setting it in the job-level env. Also removed the now-unnecessary per-step PATH override in the macOS job. Container build: added QEMU setup and platforms: linux/amd64,linux/arm64 to produce a multi-arch manifest. The Dockerfile already uses arch-aware commands (dpkg --print-architecture, uname -m) so it builds natively on both architectures. This fixes the "no matching manifest for linux/arm64/v8" error on Apple Silicon Macs. Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/build-app.yml | 15 ++++++++------- .gitea/workflows/build.yml | 4 ++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build-app.yml b/.gitea/workflows/build-app.yml index 34c8479..275b5b6 100644 --- a/.gitea/workflows/build-app.yml +++ b/.gitea/workflows/build-app.yml @@ -19,6 +19,8 @@ env: jobs: build-linux: runs-on: ubuntu-latest + env: + PATH: /home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin steps: - name: Checkout uses: actions/checkout@v4 @@ -62,20 +64,20 @@ jobs: - name: Install Rust stable run: | - if command -v rustup &>/dev/null; then + if command -v rustup >/dev/null 2>&1; 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 + echo "$HOME/.cargo/bin" >> $GITHUB_PATH rustc --version cargo --version - name: Install Node.js run: | - if command -v node &>/dev/null; then + if command -v node >/dev/null 2>&1; then echo "Node.js already installed: $(node --version)" else echo "Installing Node.js 22..." @@ -169,13 +171,14 @@ jobs: - name: Install Rust stable run: | - if command -v rustup &>/dev/null; then + if command -v rustup >/dev/null 2>&1; 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 + echo "$HOME/.cargo/bin" >> $GITHUB_PATH rustup target add aarch64-apple-darwin x86_64-apple-darwin rustc --version cargo --version @@ -190,8 +193,6 @@ jobs: - name: Build Tauri app (universal) working-directory: ./app - env: - PATH: ${{ format('{0}/.cargo/bin:{1}', env.HOME, env.PATH) }} run: npx tauri build --target universal-apple-darwin - name: Collect artifacts diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 9d7e1c8..7628239 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -21,6 +21,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -36,6 +39,7 @@ jobs: with: context: ./container file: ./container/Dockerfile + platforms: linux/amd64,linux/arm64 push: ${{ gitea.event_name == 'push' }} tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest