ci: improve clippy lint workflow to handle manual triggers and src-tauri changes
This commit is contained in:
10
.github/workflows/lint-clippy.yml
vendored
10
.github/workflows/lint-clippy.yml
vendored
@@ -22,6 +22,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check src-tauri changes
|
- name: Check src-tauri changes
|
||||||
|
if: github.event_name != 'workflow_dispatch'
|
||||||
id: check_changes
|
id: check_changes
|
||||||
uses: dorny/paths-filter@v3
|
uses: dorny/paths-filter@v3
|
||||||
with:
|
with:
|
||||||
@@ -30,13 +31,18 @@ jobs:
|
|||||||
- 'src-tauri/**'
|
- 'src-tauri/**'
|
||||||
|
|
||||||
- name: Skip if src-tauri not changed
|
- name: Skip if src-tauri not changed
|
||||||
if: steps.check_changes.outputs.rust != 'true'
|
if: github.event_name != 'workflow_dispatch' && steps.check_changes.outputs.rust != 'true'
|
||||||
run: echo "No src-tauri changes, skipping clippy lint."
|
run: echo "No src-tauri changes, skipping clippy lint."
|
||||||
|
|
||||||
- name: Continue if src-tauri changed
|
- name: Continue if src-tauri changed
|
||||||
if: steps.check_changes.outputs.rust == 'true'
|
if: github.event_name != 'workflow_dispatch' && steps.check_changes.outputs.rust == 'true'
|
||||||
run: echo "src-tauri changed, running clippy lint."
|
run: echo "src-tauri changed, running clippy lint."
|
||||||
|
|
||||||
|
- name: Manual trigger - always run
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
|
run: |
|
||||||
|
echo "Manual trigger detected: skipping changes check and running clippy."
|
||||||
|
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user