ci: use gitea actions instead of drone #40
|  | @ -22,21 +22,27 @@ jobs: | |||
|                   echo "PATH=$PATH:/usr/local/go/bin" >> $GITHUB_ENV | ||||
|             - name: Display Go version | ||||
|               run: go version | ||||
|             - name: Setup Go Cache | ||||
|               id: go-cache-paths | ||||
|               run: | | ||||
|                   echo "::set-output name=go-build::$(go env GOCACHE)" | ||||
|                   echo "::set-output name=go-mod::$(go env GOMODCACHE)" | ||||
|             - name: Go Build Cache | ||||
|               uses: https://gitea.com/actions/cache@v2 | ||||
|             - name: Get go-hashfiles | ||||
|               uses: https://gitea.com/actions/go-hashfiles@v0.0.1 | ||||
|               id: hash-go | ||||
|               with: | ||||
|                   path: ${{ steps.go-cache-paths.outputs.go-build }} | ||||
|                   key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | ||||
|             - name: Go Mod Cache | ||||
|               uses: https://gitea.com/actions/cache@v2 | ||||
|               with: | ||||
|                   path: ${{ steps.go-cache-paths.outputs.go-mod }} | ||||
|                   key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | ||||
|                   patterns: |- | ||||
|                       go.mod | ||||
|                       go.sum | ||||
| 
 | ||||
|             - name: Echo hash | ||||
|               run: echo ${{ steps.hash-go.outputs.hash }} | ||||
| 
 | ||||
|             - name: Cache go | ||||
|               id: cache-go | ||||
|               uses: https://gitea.com/actions/cache@v3 # Action cache | ||||
|               with: # specify with your GOMODCACHE and GOCACHE | ||||
|                   path: |- | ||||
|                       /root/go/pkg/mod | ||||
|                       /root/.cache/go-build | ||||
|                   key: go_cache-${{ steps.hash-go.outputs.hash }} | ||||
|                   restore-keys: |- | ||||
|                       go_cache-${{ steps.hash-go.outputs.hash }} | ||||
|             - name: Prepare | ||||
|               run: | | ||||
|                   go env -w GO111MODULE=on | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user