From 0710c2b19578c6e4d64b1c7d027a5d523506e566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=89=87=E6=BB=91=E7=BF=94=E7=BF=BC?= Date: Fri, 6 Feb 2026 16:37:22 +0800 Subject: [PATCH] Workflows: Add simple consistency check for *.pb.go files to test.yml (#5646) https://github.com/XTLS/Xray-core/commit/d14767d4f307dd42e6b41c4871480bcb85437b21 --- .github/workflows/test.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 036b7b9c..c07983a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,22 @@ jobs: if: steps.check-assets.outputs.missing == 'true' run: sleep 90 + check-proto: + runs-on: ubuntu-latest + steps: + - name: Checkout codebase + uses: actions/checkout@v6 + - name: Check Proto Version Header + run: | + head -n 4 core/config.pb.go > ref.txt + find . -name "*.pb.go" ! -name "*_grpc.pb.go" -print0 | while IFS= read -r -d '' file; do + if ! cmp -s ref.txt <(head -n 4 "$file"); then + echo "Error: Header mismatch in $file" + head -n 4 "$file" + exit 1 + fi + done + test: needs: check-assets permissions: