api-bones 6.1.0

Opinionated REST API types: errors (RFC 9457), pagination, health checks, and more
Documentation
name: Proto

on:
  push:
    branches: [main]
  pull_request:

permissions:
  contents: read

jobs:
  proto-lint:
    name: Proto Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 2
      - name: Install buf
        run: |
          BIN="$HOME/.local/bin"
          mkdir -p "$BIN"
          VERSION="1.47.2"
          curl -sSL \
            "https://github.com/bufbuild/buf/releases/download/v${VERSION}/buf-$(uname -s)-$(uname -m)" \
            -o "$BIN/buf"
          chmod +x "$BIN/buf"
          echo "$BIN" >> "$GITHUB_PATH"
      - name: buf lint
        run: make proto-lint

  proto-breaking:
    name: Proto Breaking Change
    if: github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Install buf
        run: |
          BIN="$HOME/.local/bin"
          mkdir -p "$BIN"
          VERSION="1.47.2"
          curl -sSL \
            "https://github.com/bufbuild/buf/releases/download/v${VERSION}/buf-$(uname -s)-$(uname -m)" \
            -o "$BIN/buf"
          chmod +x "$BIN/buf"
          echo "$BIN" >> "$GITHUB_PATH"
      - name: buf breaking against origin/main
        run: |
          git fetch origin main
          make proto-breaking