File tree Expand file tree Collapse file tree 2 files changed +31
-31
lines changed Expand file tree Collapse file tree 2 files changed +31
-31
lines changed Original file line number Diff line number Diff line change 1- name : README Check
1+ name : Docs Check
22on :
33 workflow_dispatch :
44 pull_request :
@@ -12,28 +12,28 @@ permissions:
1212 contents : read
1313
1414jobs :
15- readme -check :
15+ docs -check :
1616 runs-on : ubuntu-latest
1717 steps :
18- - name : Set up Go
19- uses : actions/setup-go@v5
20- - name : Check out code
21- uses : actions/checkout@v4
22- - name : Check docs is up-to-date
23- run : |
24- go generate ./...
25- if [ -n "$(git status --porcelain)" ]; then
26- echo "ERROR: docs are not up-to-date!"
27- echo ""
28- echo "The docs differ from what would be generated by `go generate ./...`."
29- echo "Please update internal/**/*.src.md instead of directly editing README.md or docs/ files,"
30- echo "then run `go generate ./...` to regenerate docs."
31- echo ""
32- echo "Changes:"
33- git status --porcelain
34- echo ""
35- echo "Diff:"
36- git diff
37- exit 1
38- fi
39- echo "Docs are up-to-date."
18+ - name : Set up Go
19+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
20+ - name : Check out code
21+ uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
22+ - name : Check docs are up-to-date
23+ run : |
24+ go generate ./...
25+ if [ -n "$(git status --porcelain)" ]; then
26+ echo "ERROR: docs are not up-to-date!"
27+ echo ""
28+ echo "The docs differ from what would be generated by `go generate ./...`."
29+ echo "Please update internal/**/*.src.md instead of directly editing README.md or docs/ files,"
30+ echo "then run `go generate ./...` to regenerate docs."
31+ echo ""
32+ echo "Changes:"
33+ git status --porcelain
34+ echo ""
35+ echo "Diff:"
36+ git diff
37+ exit 1
38+ fi
39+ echo "Docs are up-to-date."
Original file line number Diff line number Diff line change 1414 runs-on : ubuntu-latest
1515 steps :
1616 - name : Check out code
17- uses : actions/checkout@v4
17+ uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
1818 - name : Set up Go
19- uses : actions/setup-go@v5
19+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
2020 with :
2121 go-version : " ^1.23"
2222 - name : Check formatting
3131 - name : Run Go vet
3232 run : go vet ./...
3333 - name : Run staticcheck
34- uses : dominikh/staticcheck-action@v1
34+ uses : dominikh/staticcheck-action@024238d2898c874f26d723e7d0ff4308c35589a2 # v1
3535 with :
3636 version : " latest"
3737
4242 go : ["1.23", "1.24", "1.25"]
4343 steps :
4444 - name : Check out code
45- uses : actions/checkout@v4
45+ uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
4646 - name : Set up Go
47- uses : actions/setup-go@v5
47+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
4848 with :
4949 go-version : ${{ matrix.go }}
5050 - name : Test
5454 runs-on : ubuntu-latest
5555 steps :
5656 - name : Check out code
57- uses : actions/checkout@v4
57+ uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
5858 - name : Set up Go
59- uses : actions/setup-go@v5
59+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
6060 with :
6161 go-version : " 1.24"
6262 - name : Test with -race
You can’t perform that action at this time.
0 commit comments