File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : librarian tidy
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - ' librarian.yaml'
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ tidy-check :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v6
17+
18+ - name : Install Go
19+ uses : actions/setup-go@v6
20+ with :
21+ go-version : ' 1.26.x'
22+
23+ - name : Run librarian tidy
24+ run : |
25+ V=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
26+ go run github.com/googleapis/librarian/cmd/librarian@${V} tidy
27+ git diff
28+
29+ - name : Check for diff
30+ run : |
31+ if ! git diff --exit-code; then
32+ V=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
33+ echo "librarian.yaml is not tidy. Please run:"
34+ echo ""
35+ echo " go run github.com/googleapis/librarian/cmd/librarian@${V} tidy"
36+ echo ""
37+ echo "to tidy librarian.yaml and commit the changes."
38+ exit 1
39+ fi
40+
You can’t perform that action at this time.
0 commit comments