From 6428dd21577a201fb8db5719e2a84b47d1cbcee8 Mon Sep 17 00:00:00 2001 From: DelphicOkami Date: Thu, 19 Mar 2026 01:36:09 +0000 Subject: [PATCH] Cache me outside? --- .gitea/workflows/test.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 762638a..2b953bb 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -9,6 +9,8 @@ env: jobs: go-test: + env: + RUNNER_TOOL_CACHE: /cache/tools runs-on: ubuntu-latest steps: - name: Checkout @@ -18,6 +20,28 @@ jobs: uses: actions/setup-go@v5 with: go-version: "1.26.x" + + - name: Get go-hashfiles + uses: https://gitea.com/actions/go-hashfiles@v0.0.1 + id: hash-go + with: + patterns: |- + go.mod + go.sum + + - name: Echo hash + run: echo ${{ steps.hash-go.outputs.hash }} + + - name: Cache go + id: cache-go + uses: https://github.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: Check Formatting run: |