Skip to content

Commit c17bf82

Browse files
authored
Use actions/setup-go@v2 in GitHub Actions. (#128)
Fixes issues with addlicense requiring Go v1.16+. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
1 parent fd0be84 commit c17bf82

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)