-
Notifications
You must be signed in to change notification settings - Fork 34
39 lines (36 loc) · 1.26 KB
/
ci-protobuf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Continuous integration handling for Protocol Buffers
name: ci-protobuf
on:
pull_request:
paths:
- .github/workflows/ci-protobuf.yml
- go.mod
- go.sum
- 'tfprotov5/internal/tfplugin5/*'
- 'tfprotov6/internal/tfplugin6/*'
- tools/go.mod
- tools/go.sum
permissions:
contents: read
jobs:
protoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
# The version string is embedded in protoc generated files, so it is
# pinned here to prevent unexpected differences. Follow the
# https://github.com/protocolbuffers/protobuf repository for protoc
# release updates.
version: '25.1'
- run: go mod download
- run: make tools
- run: make protoc
- name: git diff
run: |
git diff --compact-summary --exit-code || \
(echo; git diff; echo; echo "Unexpected difference in directories after code generation. Run 'protoc' command and commit."; exit 1)