etcds 0.21.2

An etcd v3 API server - light server version for queue management
name: audit and geiger

# cargo audit: known vulnerabilities (RustSec) in the dependencies. cargo geiger:
# unsafe code in etcds and in each crate it uses, on the run's summary page.
# On a push and a pull request (Dependabot's among them), and weekly: an advisory
# can come out with nothing changed here.
on:
  push:
    branches-ignore: ["dependabot/**"]   # their pull request runs it
  pull_request:
  schedule:
    - cron: "17 5 * * 1"
  workflow_dispatch:

permissions:
  contents: read

concurrency:
  group: audit-${{ github.ref }}
  cancel-in-progress: true

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - uses: taiki-e/install-action@v2
        with:
          tool: cargo-audit
      # no Cargo.lock in the repository: the one a build would resolve today
      - run: cargo generate-lockfile
      - run: cargo audit

  geiger:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - uses: taiki-e/install-action@v2
        with:
          tool: cargo-geiger
      # build.rs compiles the etcd protos (tonic-prost-build)
      - run: sudo apt-get update && sudo apt-get install -y --no-install-recommends protobuf-compiler
      # a report, not a gate: the counts go to the log and the summary page
      - run: cargo geiger --output-format GitHubMarkdown | tee -a "$GITHUB_STEP_SUMMARY"