From d57b1039723dec624bf40e6abb8fb6ca92a8c98c Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Tue, 13 Jan 2026 14:41:15 +0800 Subject: feat: refine GitHub Actions workflow to trigger only on main branch --- .github/workflows/test.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28f341b..b5311c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,13 @@ name: Test & Build on: push: - branches: ["main", "master", "dev"] + branches: ["main"] + paths-ignore: + - "**.md" + - "ui/**" pull_request: - branches: ["main", "master", "dev"] + branches: ["main"] + workflow_dispatch: env: CARGO_TERM_COLOR: always @@ -16,7 +20,8 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-22.04, windows-latest, macos-14] + # On Push: Linux only. On PR: All platforms. + platform: ${{ (github.event_name == 'pull_request') && fromJson('["ubuntu-22.04", "windows-latest", "macos-14"]') || fromJson('["ubuntu-22.04"]') }} steps: - uses: actions/checkout@v4 -- cgit v1.2.3-70-g09d2