From fa68f101de1e47b3754f77e52b698f38eccc5922 Mon Sep 17 00:00:00 2001 From: lafay <2021211506@stu.hit.edu.cn> Date: Sat, 21 Mar 2026 14:15:27 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0Go=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E5=92=8CDocker=E6=9E=84=E5=BB=BA=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 721caf6..b0b6d93 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -10,6 +10,9 @@ on: - master - dev +env: + GO_VERSION: '1.25' + jobs: build: runs-on: ubuntu-latest @@ -20,8 +23,15 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.25' - cache: false + go-version: ${{ env.GO_VERSION }} + cache: true + + - name: Go cache info + run: | + echo "Go cache directory:" + go env GOCACHE + echo "Go module cache directory:" + go env GOMODCACHE - name: Install build tools run: sudo apt-get update && sudo apt-get install -y gcc @@ -76,3 +86,5 @@ jobs: code.littlelan.cn/carrot_bbs/backend:latest code.littlelan.cn/carrot_bbs/backend:${{ github.sha }} platforms: linux/amd64 + cache-from: type=gha + cache-to: type=gha,mode=max