修复缓存

This commit is contained in:
2026-05-02 23:45:02 +08:00
parent 585986fe5a
commit ee720e105e

View File

@@ -39,6 +39,22 @@ jobs:
cd $(go env GOROOT) cd $(go env GOROOT)
for p in $GITHUB_WORKSPACE/.github/patch/*.patch; do patch --verbose -p 1 < "$p"; done for p in $GITHUB_WORKSPACE/.github/patch/*.patch; do patch --verbose -p 1 < "$p"; done
- name: Calculate go.sum hash
id: calc-hash
run: |
HASH=$(sha256sum $GITHUB_WORKSPACE/core/src/foss/golang/go.sum | cut -d ' ' -f 1)
echo "GOSUM_HASH=$HASH" >> $GITHUB_OUTPUT
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ steps.calc-hash.outputs.GOSUM_HASH }}
restore-keys: |
${{ runner.os }}-go-
- name: Update CA - name: Update CA
run: | run: |
sudo apt-get update && sudo apt-get install ca-certificates sudo apt-get update && sudo apt-get install ca-certificates