Skip to content

auditor: move serde to dev-dependencies in tokmd-model 🧾 #4033

auditor: move serde to dev-dependencies in tokmd-model 🧾

auditor: move serde to dev-dependencies in tokmd-model 🧾 #4033

Workflow file for this run

name: PR Cockpit
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
concurrency:
group: cockpit-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' && github.event.action == 'synchronize' }}
env:
CARGO_TERM_COLOR: always
jobs:
cockpit:
name: PR Cockpit Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: cockpit
cache-on-failure: true
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build and install tokmd
run: cargo install --path crates/tokmd --features git --locked
- name: Generate cockpit report
id: cockpit
run: |
set -euo pipefail
# Generate sections format for PR comment
tokmd cockpit --base "origin/${{ github.base_ref }}" --head HEAD --format sections > cockpit-sections.md
# Generate JSON receipt for artifact
tokmd cockpit --base "origin/${{ github.base_ref }}" --head HEAD --format json > cockpit-receipt.json
# Wrap sections with HTML comment markers for updateable comment
{
echo "<!-- SECTION:COCKPIT -->"
cat cockpit-sections.md
echo ""
echo "<!-- /SECTION:COCKPIT -->"
} > cockpit-comment.md
- name: Post or update PR comment
uses: thollander/actions-comment-pull-request@v3
with:
file-path: cockpit-comment.md
comment-tag: SECTION:COCKPIT
- name: Upload cockpit receipt
uses: actions/upload-artifact@v7
with:
name: cockpit-receipt
path: cockpit-receipt.json
retention-days: 30