Skip to content

Commit a78aa05

Browse files
committed
Fix installation of Go dependencies in GitHub Actions.
Signed-off-by: Piotr Sikora <[email protected]>
1 parent fd0be84 commit a78aa05

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/cpp.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535

3636
steps:
3737
- uses: actions/checkout@v2
38+
- uses: actions/setup-go@v2
39+
with:
40+
go-version: '^1.16'
3841

3942
- name: Format (clang-format)
4043
run: |
@@ -44,13 +47,15 @@ jobs:
4447
4548
- name: Format (buildifier)
4649
run: |
47-
go get -u github.com/bazelbuild/buildtools/buildifier
50+
go version
51+
go install github.com/bazelbuild/buildtools/buildifier@latest
4852
export PATH=$PATH:$(go env GOPATH)/bin
4953
find . -name "BUILD" | xargs -n1 buildifier -mode=check
5054
5155
- name: Format (addlicense)
5256
run: |
53-
go get -u github.com/google/addlicense
57+
go version
58+
go install github.com/google/addlicense@latest
5459
export PATH=$PATH:$(go env GOPATH)/bin
5560
addlicense -check .
5661

0 commit comments

Comments
 (0)