mirror of
				https://gitea.com/gitea/act_runner.git
				synced 2025-10-31 12:57:56 +01:00 
			
		
		
		
	Improve workflows (#516)
Starting from setup-go v4, it will cache build dependencies by default, see https://github.com/actions/setup-go#caching-dependency-files-and-build-outputs. Also bump some versions. Reviewed-on: https://gitea.com/gitea/act_runner/pulls/516 Reviewed-by: silverwind <silverwind@noreply.gitea.com> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Jason Song <i@wolfogre.com> Co-committed-by: Jason Song <i@wolfogre.com>
This commit is contained in:
		| @@ -3,33 +3,15 @@ on: | ||||
|   - push | ||||
|   - pull_request | ||||
|  | ||||
| env: | ||||
|   GOPATH: /go_path | ||||
|   GOCACHE: /go_cache | ||||
|  | ||||
| jobs: | ||||
|   lint: | ||||
|     name: check and test | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - uses: actions/setup-go@v4 | ||||
|       - uses: actions/setup-go@v5 | ||||
|         with: | ||||
|           go-version: '>=1.21.0' | ||||
|       - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 | ||||
|         id: hash-go | ||||
|         with: | ||||
|           patterns: | | ||||
|             go.mod | ||||
|             go.sum | ||||
|       - name: cache go | ||||
|         id: cache-go | ||||
|         uses: https://github.com/actions/cache@v3 | ||||
|         with: | ||||
|           path: | | ||||
|             /go_path | ||||
|             /go_cache | ||||
|           key: go_path-${{ steps.hash-go.outputs.hash }} | ||||
|           go-version-file: 'go.mod' | ||||
|       - name: vet checks | ||||
|         run: make vet | ||||
|       - name: build | ||||
|   | ||||
		Reference in New Issue
	
	Block a user