| 1 | name: cargo-deny |
| 2 | |
| 3 | permissions: {} |
| 4 | |
| 5 | on: |
| 6 | workflow_dispatch: {} |
| 7 | workflow_call: {} |
| 8 | |
| 9 | env: |
| 10 | CARGO_TERM_COLOR: always |
| 11 | |
| 12 | jobs: |
| 13 | deny: |
| 14 | name: cargo-deny |
| 15 | runs-on: ubuntu-24.04 |
| 16 | timeout-minutes: 20 |
| 17 | strategy: |
| 18 | matrix: |
| 19 | checks: |
| 20 | - advisories |
| 21 | - bans licenses sources |
| 22 | # Prevent sudden announcement of a new advisory from failing CI |
| 23 | continue-on-error: ${{ matrix.checks == 'advisories' }} |
| 24 | steps: |
| 25 | - uses: actions/checkout@v7 |
| 26 | # rust-toolchain.toml pins `channel = "1.100.0"` with no target, so |
| 27 | # inside the action's alpine (musl) container rustup resolves it to |
| 28 | # `1.100.0-x86_64-unknown-linux-musl`, which the container does not |
| 29 | # have. Without provisioning, the action's `rustup show` step prints |
| 30 | # "error: override toolchain '1.100.0-x86_64-unknown-linux-musl' is not |
| 31 | # installed" and then auto-installs mid-run (network-dependent ~12s |
| 32 | # detour, hard failure if the download stalls). `rust-version` makes the |
| 33 | # entrypoint run `rustup default 1.100.0` (same musl host triple) before |
| 34 | # cargo-deny touches the workspace, so the toolchain file resolves to an |
| 35 | # already-installed toolchain on every run. |
| 36 | - uses: EmbarkStudios/cargo-deny-action@v2 |
| 37 | with: |
| 38 | command: check ${{ matrix.checks }} |
| 39 | rust-version: 1.100.0 |
| 40 |