Skip to content

Commit b8cb65f

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

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/cpp.yml

Lines changed: 5 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,13 @@ jobs:
4447
4548
- name: Format (buildifier)
4649
run: |
47-
go get -u github.com/bazelbuild/buildtools/buildifier
50+
go install github.com/bazelbuild/buildtools/buildifier@latest
4851
export PATH=$PATH:$(go env GOPATH)/bin
4952
find . -name "BUILD" | xargs -n1 buildifier -mode=check
5053
5154
- name: Format (addlicense)
5255
run: |
53-
go get -u github.com/google/addlicense
56+
go install github.com/google/addlicense@latest
5457
export PATH=$PATH:$(go env GOPATH)/bin
5558
addlicense -check .
5659

0 commit comments

Comments
 (0)