Merge pull request #5717 from aboimpinto/feat/FEAT-021-adopt-command-… #1062
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: cargo-deny | |
| permissions: {} | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/cargo-deny.yml' | |
| - '**/Cargo.toml' | |
| - '**/Cargo.lock' | |
| - 'deny.toml' | |
| push: | |
| branches: [main, master] | |
| schedule: | |
| # Run weekly on Monday at 06:31 UTC | |
| - cron: '31 6 * * 1' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| deny: | |
| name: cargo-deny | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| checks: | |
| - advisories | |
| - bans licenses sources | |
| # Prevent sudden announcement of a new advisory from failing CI | |
| continue-on-error: ${{ matrix.checks == 'advisories' }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| # rust-toolchain.toml pins `channel = "stable"` with no target, so | |
| # inside the action's alpine (musl) container rustup resolves it to | |
| # `stable-x86_64-unknown-linux-musl` — which the container does not | |
| # have. Without provisioning, the action's `rustup show` step prints | |
| # "error: override toolchain 'stable-x86_64-unknown-linux-musl' is not | |
| # installed" and then auto-installs mid-run (network-dependent ~12s | |
| # detour, hard failure if the download stalls). `rust-version` makes the | |
| # entrypoint run `rustup default stable` (same musl host triple) before | |
| # cargo-deny touches the workspace, so the toolchain file resolves to an | |
| # already-installed toolchain on every run. | |
| - uses: EmbarkStudios/cargo-deny-action@v2 | |
| with: | |
| command: check ${{ matrix.checks }} | |
| rust-version: stable |