Skip to content

Commit

Permalink
ci: separate workflow for cargo deny (save a queueing job) (#7541)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen authored Nov 29, 2024
1 parent 6ef9cb0 commit 2c57fd5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,28 +153,6 @@ jobs:
with:
files: .

deny:
name: Cargo Deny
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'Cargo.lock'
- uses: Boshen/setup-rust@main
if: steps.filter.outputs.src == 'true'
with:
restore-cache: false
tools: cargo-deny

- if: steps.filter.outputs.src == 'true'
run: cargo deny check

lint:
name: Clippy
runs-on: ubuntu-latest
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Cargo Deny

on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths:
- "Cargo.lock"
push:
branches:
- main
paths:
- "Cargo.lock"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

jobs:
deny:
name: Cargo Deny
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- uses: Boshen/setup-rust@main
with:
restore-cache: false
tools: cargo-deny

- run: cargo deny check

0 comments on commit 2c57fd5

Please sign in to comment.