communique 1.6.0

Editorialized release notes powered by AI
name: CI implementation

on:
  workflow_call:
    inputs:
      trusted:
        required: true
        type: boolean

permissions:
  contents: read

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

env:
  MBX_DISABLE: "1"

jobs:
  ci:
    runs-on: ${{ github.event_name == 'pull_request' && (github.event.pull_request.head.repo.full_name != github.repository || github.event.pull_request.user.login != 'jdx') && 'ubuntu-latest' || 'namespace-profile-endev-linux-amd64;overrides.cache-tag=cache' }}
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
        with:
          persist-credentials: false
      - uses: jdx/mise-action@9149ea85001c7435d5a66bb127d6a1b6227cb0a5 # v5.0.0
      - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
        with:
          shared-key: ci-rust
          save-if: ${{ inputs.trusted && github.ref == 'refs/heads/main' }}
      - run: rustup component add clippy rustfmt
      # cargo-audit: a tag-only ref by design, so this pin is not on a branch.
      - uses: taiki-e/install-action@c030abdc26abd91eb618a6c9d1963825f7ce5a90
      - run: mise run render
      - name: assert render produces no diff
        run: |
          if [ -n "$(git status --porcelain)" ]; then
            echo "::error::'mise run render' produced changes. Run it locally and commit."
            git status
            git diff HEAD
            exit 1
          fi
      - run: mise run lint
        env:
          # online checks (vulnerable, impostor and stale action refs) run in CI only
          JACTIONLINT_ONLINE: 1
          GITHUB_TOKEN: ${{ github.token }}
      - run: cargo test
      - run: cargo audit