diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 377ff767..8402d490 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -5,6 +5,11 @@ on: branches: ["develop", "main", "releases/**"] pull_request: branches: ["develop", "main"] + types: [opened, synchronize, reopened, ready_for_review] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true env: CARGO_TERM_COLOR: always @@ -21,7 +26,7 @@ jobs: # Map a step output to a job output outputs: # do not skip push on branch starts with releases/ - should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} + should_skip: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft) || (steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/')) }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v5 @@ -51,7 +56,7 @@ jobs: easytier-web/frontend/dist/* build: strategy: - fail-fast: false + fail-fast: true matrix: include: - TARGET: aarch64-unknown-linux-musl diff --git a/.github/workflows/gui.yml b/.github/workflows/gui.yml index afa7a1e3..994c8981 100644 --- a/.github/workflows/gui.yml +++ b/.github/workflows/gui.yml @@ -5,7 +5,12 @@ on: branches: ["develop", "main", "releases/**"] pull_request: branches: ["develop", "main"] - + types: [opened, synchronize, reopened, ready_for_review] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: CARGO_TERM_COLOR: always @@ -20,7 +25,7 @@ jobs: runs-on: ubuntu-latest # Map a step output to a job output outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} + should_skip: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft) || (steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/')) }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v5 @@ -32,7 +37,7 @@ jobs: paths: '["Cargo.toml", "Cargo.lock", "easytier/**", "easytier-gui/**", ".github/workflows/gui.yml", ".github/workflows/install_rust.sh", ".github/workflows/install_gui_dep.sh", "easytier-web/frontend-lib/**"]' build-gui: strategy: - fail-fast: false + fail-fast: true matrix: include: - TARGET: aarch64-unknown-linux-musl diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index f44ad550..74df2452 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -5,7 +5,12 @@ on: branches: ["develop", "main", "releases/**"] pull_request: branches: ["develop", "main"] - + types: [opened, synchronize, reopened, ready_for_review] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: CARGO_TERM_COLOR: always @@ -20,7 +25,7 @@ jobs: runs-on: ubuntu-latest # Map a step output to a job output outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} + should_skip: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft) || (steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/')) }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v5 @@ -32,7 +37,7 @@ jobs: paths: '["Cargo.toml", "Cargo.lock", "easytier/**", "easytier-gui/**", "tauri-plugin-vpnservice/**", ".github/workflows/mobile.yml", ".github/workflows/install_rust.sh"]' build-mobile: strategy: - fail-fast: false + fail-fast: true matrix: include: - TARGET: android diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 3182ce07..4590f6d7 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -8,12 +8,18 @@ on: - "flake.lock" pull_request: branches: ["main", "develop"] + types: [opened, synchronize, reopened, ready_for_review] paths: - "**/*.nix" - "flake.lock" +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: check-full-shell: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 diff --git a/.github/workflows/ohos.yml b/.github/workflows/ohos.yml index 2febe3fb..292a9f79 100644 --- a/.github/workflows/ohos.yml +++ b/.github/workflows/ohos.yml @@ -8,8 +8,13 @@ on: - '!*-pre' pull_request: branches: ["develop", "main"] + types: [opened, synchronize, reopened, ready_for_review] workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: CARGO_TERM_COLOR: always @@ -20,6 +25,7 @@ defaults: jobs: cargo_fmt_check: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 @@ -35,7 +41,7 @@ jobs: # Map a step output to a job output outputs: # do not skip push on branch starts with releases/ - should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} + should_skip: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft) || (steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/')) }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v5 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72dad752..01d9d37d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [ "develop", "main" ] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: CARGO_TERM_COLOR: always # RUSTC_WRAPPER: "sccache" diff --git a/tauri-plugin-vpnservice/.github/workflows/audit.yml b/tauri-plugin-vpnservice/.github/workflows/audit.yml index f353a1ef..6b92c916 100644 --- a/tauri-plugin-vpnservice/.github/workflows/audit.yml +++ b/tauri-plugin-vpnservice/.github/workflows/audit.yml @@ -19,7 +19,7 @@ on: - "**/Cargo.toml" concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: diff --git a/tauri-plugin-vpnservice/.github/workflows/clippy.yml b/tauri-plugin-vpnservice/.github/workflows/clippy.yml index 6f67af43..264bb67d 100644 --- a/tauri-plugin-vpnservice/.github/workflows/clippy.yml +++ b/tauri-plugin-vpnservice/.github/workflows/clippy.yml @@ -17,7 +17,7 @@ on: - "**/Cargo.toml" concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: diff --git a/tauri-plugin-vpnservice/.github/workflows/test.yml b/tauri-plugin-vpnservice/.github/workflows/test.yml index cafd6575..821b3e28 100644 --- a/tauri-plugin-vpnservice/.github/workflows/test.yml +++ b/tauri-plugin-vpnservice/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: - main concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: