chore(ci): cache go modules with unified key to reduce cache size

This commit is contained in:
Hintay 2025-02-06 15:08:03 +09:00
parent f423b6599c
commit dc0d31ff54
No known key found for this signature in database
GPG key ID: 120FC7FF121F2F2D

View file

@ -157,13 +157,23 @@ jobs:
echo "DIST=nginx-ui-$_NAME" >> $GITHUB_ENV
echo "ARTIFACT=$_ARTIFACT" >> $GITHUB_ENV
- name: Setup go caches
- name: Setup Go modules cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
key: go-${{ runner.os }}-${{ runner.arch }}-mod-${{ hashFiles('go.mod') }}
restore-keys: |
go-${{ runner.os }}-${{ runner.arch }}-mod-
- name: Setup Go build cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
key: go-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_NAME }}-${{ hashFiles('go.mod') }}
restore-keys: |
go-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_NAME }}-
- name: Download app artifacts
uses: actions/download-artifact@v4