Repository: tauri
Issue: [bug] Github Action was not able to generate AppImage 
Labels: type: bug,platform: Linux,status: needs triage

### Describe the bug

I have a custom Github Action runner connected to my Raspberry PI 4+, using Raspbian Bookworm 64bit.

I have a yaml script that performs the steps:
```
name: Release
on:
  push:
    tags:
      - "v*"
  workflow_dispatch:

jobs:
  release:
    strategy:
      fail-fast: false
    runs-on: [self-hosted, linux, ARM64]
    permissions:
      contents: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Rust setup
        uses: dtolnay/rust-toolchain@stable
        with:
          targets: aarch64-unknown-linux-gnu

      - name: Rust cache
        uses: swatinem/rust-cache@v2
        with:
          workspaces: "./legend-ui/src-tauri -> target"

      - name: install dependencies
        run: |
          export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/x86_64-linux-gnu
          export PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu/

          # https://github.com/tauri-apps/tauri/issues/8929
          export NO_STRIP=true

          sudo apt-get update
          sudo apt-get upgrade -y
          sudo apt-get autoremove -y
          
          sudo apt-get install -y libappindicator3-1
          sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libxdo-dev libayatana-appindicator3-dev librsvg2-dev patchelf libudev-dev
        # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.

      - name: Sync node version and setup cache
        uses: actions/setup-node@v4
        with:
          node-version: "lts/*"
          cache: npm
          cache-dependency-path: legend-ui/package-lock.json


      - name: Install frontend dependencies
        run: cd legend-ui && npm ci
        
      - uses: tauri-apps/tauri-action@v0
        env:
          PKG_CONFIG_SYSROOT_DIR: /usr/aarch64-linux-gnu/
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tagName:legend-v__VERSION__
          releaseName: 'v__VERSION__'
          releaseBody: 'See the assets to download this version and install.'
          releaseDraft: false
          prerelease: false
          args: --target aarch64-unknown-linux-gnu --verbose 
```

When building AppImage, it produces an error:

```
...
2024-07-25T15:29:28.4342645Z -- Running input plugin: gtk --
2024-07-25T15:29:28.4802435Z [gtk/stdout] Installing AppRun hook
2024-07-25T15:29:28.4809055Z [gtk/stderr] chmod: cannot access 'legend-ui.AppDir/usr/lib64': No such file or directory
2024-07-25T15:29:28.4814483Z [gtk/stdout] Installing GLib schemas
2024-07-25T15:29:28.4821498Z [gtk/stderr] cp: cannot stat '/usr/aarch64-linux-gnu//usr/share/glib-2.0/schemas': No such file or directory
2024-07-25T15:29:28.4827822Z ERROR: Failed to run plugin: gtk (exit code: 1)
2024-07-25T15:29:28.5337842Z        Error [tauri_cli_node] failed to bundle project: error running appimage.sh
2024-07-25T15:29:28.5736359Z ##[error]Command failed with exit code 1: tauri build --target aarch64-unknown-linux-gnu --verbose
```

However, it built rpm and deb file successfully.

Here's a more complete log:
https://productionresultssa1.blob.core.windows.net/actions-results/60a8c785-314c-4e60-8406-ccd1b51a165a/workflow-job-run-8d802004-fbbb-5f17-b73e-f23de0c1dec8/logs/job/job-logs.txt?rsct=text%2Fplain&se=2024-07-25T20%3A03%3A06Z&sig=N0e%2BgcMSUK6DN0aGFjlk9yDdRta5WvmLo2fDJBDp22c%3D&ske=2024-07-26T07%3A49%3A42Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2024-07-25T19%3A49%3A42Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2024-05-04&sp=r&spr=https&sr=b&st=2024-07-25T19%3A53%3A01Z&sv=2024-05-04

### Reproduction

_No response_

### Expected behavior

Expect AppImage to be built successfully

### Full `tauri info` output

```text
(development machine) 
> legend-ui@0.0.0 tauri
> tauri info


[✔] Environment
    - OS: Pop!_OS 22.04 X64
    ✔ webkit2gtk-4.0: 2.44.2
    ✔ rsvg2: 2.52.5
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.11.0
    - npm: 10.2.4

[-] Packages
    - tauri [RUST]: 1.6.5
    - tauri-build [RUST]: 1.5.2
    - wry [RUST]: 0.24.9
    - tao [RUST]: 0.16.9
    - @tauri-apps/api [NPM]: 1.5.6 (outdated, latest: 1.6.0)
    - @tauri-apps/cli [NPM]: 1.5.13 (outdated, latest: 1.6.0)

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:4321/
    - bundler: Vite
```


### Stack trace

_No response_

### Additional context

```
[package]
name = "legend-ui"
version = "0.0.0"
description = "A Tauri App"
authors = ["you"]
license = ""
repository = ""
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "1.5", features = [] }

[dependencies]
tauri = { version = "1.5", features = [ "window-all", "fs-all", "shell-open", "devtools"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
rusb = "0.9"
serialport = "4.3.0"
mio-serial = "5.0.1"
mio = "0.8.11"
log = "^0.4"
bincode = "1.3.3"
strum = "0.26"
strum_macros = "0.26"
lazy_static = "1.4.0"
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }


[features]
# this feature is used for production builds or when `devPath` points to the filesystem
# DO NOT REMOVE!!
custom-protocol = ["tauri/custom-protocol"]

[profile.release.package.wry]
debug = true
debug-assertions = true

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

```