File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55name : " Go Validate"
66
7- on : [ workflow_dispatch, push ]
7+ on : [ push ]
88
99permissions :
1010 contents : read
1111
1212jobs :
1313 get-go-version :
1414 runs-on : ubuntu-latest
15- outputs :
16- go-version : ${{ steps.get-go-version.outputs.go-version }}
1715 steps :
1816 - uses : actions/checkout@v2
1917 - name : ' Determine Go version'
2018 id : get-go-version
2119 run : |
22- echo "Building with Go $(cat .go-version)"
23- echo "::set-output name= go-version:: $(cat .go-version)"
20+ echo "Found Go $(cat .go-version)"
21+ echo "go-version= $(cat .go-version)" >> $GITHUB_OUTPUT
2422 check-mod-tidy :
23+ needs :
24+ - get-go-version
2525 runs-on : ubuntu-latest
2626 name : Go Mod Tidy
2727 steps :
2828 - uses : actions/checkout@v2
2929 - uses : actions/setup-go@v3
3030 with :
3131 go-version : ${{ needs.get-go-version.outputs.go-version }}
32- - run : go mod tidy
32+ - run : |
33+ go version
34+ go mod tidy
3335 check-lint :
36+ needs :
37+ - get-go-version
3438 runs-on : ubuntu-latest
3539 name : Lint check
3640 steps :
4347 version : v1.47.3
4448 only-new-issues : true
4549 check-fmt :
50+ needs :
51+ - get-go-version
4652 runs-on : ubuntu-latest
4753 name : Gofmt check
4854 steps :
5965 exit 1; \
6066 fi
6167 check-generate :
68+ needs :
69+ - get-go-version
6270 runs-on : ubuntu-latest
6371 name : Generate check
6472 steps :
You can’t perform that action at this time.
0 commit comments