Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

linux.yml: build and test pull requests that touch windows/

Louis Raillec0bb71fd7fec
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 21d8cc95..9a5839b9 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -1,8 +1,9 @@
name: Linux
# Builds the Linux app (AppImage, .deb, .rpm) from the same Tauri project as
-# Windows. Triggered by tags like `linux-v0.1.0`, or by hand; the macOS and
-# Windows workflows are untouched.
+# Windows. Triggered by tags like `linux-v0.1.0`, by hand, and by pull requests
+# that touch windows/ or this file (build and test only); the macOS and Windows
+# workflows are untouched.
#
# Two jobs on purpose. `build` runs npm, cargo and the AppImage tooling (which
# downloads its own helpers) with a read-only token that is not even kept on
@@ -13,6 +14,13 @@ on:
tags:
- 'linux-v*'
workflow_dispatch:
+ # Build and test only. A pull request never uploads artifacts and never
+ # reaches the publish job (see the two gates below), and a fork's token is
+ # read-only anyway.
+ pull_request:
+ paths:
+ - 'windows/**'
+ - '.github/workflows/linux.yml'
permissions:
contents: read
@@ -109,7 +117,7 @@ jobs:
- name: Decide whether to publish
id: gate
- run: echo "publish=${{ env.PUBLISH == 'true' && startsWith(github.ref, 'refs/tags/linux-v') }}" >> "$GITHUB_OUTPUT"
+ run: echo "publish=${{ github.event_name == 'push' && env.PUBLISH == 'true' && startsWith(github.ref, 'refs/tags/linux-v') }}" >> "$GITHUB_OUTPUT"
# Upload only on a manual run or when publishing a release, as on Windows.
# The repo is public, so artifacts are downloadable by any signed-in GitHub
@@ -125,7 +133,9 @@ jobs:
publish:
needs: build
- if: needs.build.outputs.publish == 'true'
+ # Checked again here, so a pull request can never get this far whatever
+ # the build job reports.
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/linux-v') && needs.build.outputs.publish == 'true'
runs-on: ubuntu-22.04
permissions:
contents: write