name: Proto

on:
  pull_request:
    paths:
      - .github/workflows/proto.yml
      - bin/protoc*
      - "**/*.proto"
      - "**/gen/**/*.go"

permissions:
  contents: read

jobs:
  proto-diff:
    timeout-minutes: 10
    runs-on: ${{ vars.LINKERD2_RUNNER || 'ubuntu-24.04' }}
    container: ghcr.io/linkerd/dev:v47-go
    steps:
      - run: apt update && apt install -y unzip
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
      - run: git config --global --add safe.directory "$PWD" # actions/runner#2033
      - run: bin/protoc-go.sh
      - run: git diff --exit-code
