Skip to content

Commit

Permalink
ci: separate deny.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Dec 5, 2024
1 parent 84847eb commit 45a60cf
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 21 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,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
with:
restore-cache: false
tools: cargo-deny

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

unused-deps:
name: Check Unused Dependencies
runs-on: ubuntu-latest
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Cargo Deny

on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths:
- "Cargo.lock"
- "deny.toml"
- ".github/workflows/deny.yml"
push:
branches:
- main
paths:
- "Cargo.lock"
- "deny.toml"
- ".github/workflows/deny.yml"

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 45a60cf

Please sign in to comment.