ci: setup cache
All checks were successful
checks / build (push) Successful in 1m57s
checks / build (pull_request) Successful in 1m10s

This commit is contained in:
张泊明518370910136 2024-09-19 18:46:51 -04:00
parent 9f2a26dc1e
commit 60e0c788aa
GPG Key ID: D47306D7062CDA9D

View File

@ -20,14 +20,22 @@ jobs:
tar -C /usr/local -xzf go1.23.1.linux-amd64.tar.gz
rm -rf go1.23.1.linux-amd64.tar.gz
echo "PATH=$PATH:/usr/local/go/bin" >> $GITHUB_ENV
- name: Sanity Check
run: |
ls -lha
ls -lha ~/.ssh
whoami
echo $PATH
- name: Display Go version
run: go version
- 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
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') }}
- name: Prepare
run: |
go env -w GO111MODULE=on