Modify audit.yml - give it only write permission #43
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| types: [ opened, reopened, synchronize ] | |
| branches: | |
| - main | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # We explicitly allow only the read permission for security reasons; no other permission is needed. | |
| permissions: | |
| contents: read | |
| # A workflow run is made up of one or more jobs, which run in parallel by default. | |
| # Each job runs in a runner environment specified by `runs-on`. | |
| jobs: | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ilammy/setup-nasm@v1 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| toolchain: 1.89.0 # MSRV check | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Linting | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Enforce formatting | |
| run: cargo fmt -- --check --color always | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: ilammy/setup-nasm@v1 | |
| - name: Check out repository code | |
| uses: actions/checkout@v5 | |
| # This GitHub Action installs a Rust toolchain using "rustup". | |
| # It is designed for one-line concise usage and good defaults. | |
| - name: Install the Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| # A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults. | |
| - name: Rust Cache Action | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run tests | |
| run: cargo test | |
| ci_success: | |
| name: CI success | |
| runs-on: ubuntu-latest | |
| needs: [clippy, fmt, test] | |
| steps: | |
| - run: echo "All CI jobs successfully finished." |