Workflows: Add simple consistency check for *.pb.go files to test.yml (#5646)

d14767d4f3
This commit is contained in:
风扇滑翔翼
2026-02-06 16:37:22 +08:00
committed by GitHub
parent 4632984b66
commit 0710c2b195

View File

@@ -34,6 +34,22 @@ jobs:
if: steps.check-assets.outputs.missing == 'true' if: steps.check-assets.outputs.missing == 'true'
run: sleep 90 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: test:
needs: check-assets needs: check-assets
permissions: permissions: