configure caches
Some checks are pending
build container / build-container (push) Waiting to run
run go test / test (push) Waiting to run

This commit is contained in:
guochao 2025-02-19 20:46:53 +08:00
parent 7ba2e2e82f
commit 18bdc4f54e
2 changed files with 17 additions and 0 deletions

View File

@ -15,6 +15,12 @@ jobs:
if: ${{ vars.DEBIAN_MIRROR && vars.DEBIAN_APT_SOURCES }}
- name: Setup debian environment
run: apt update && apt install -y podman podman-compose nodejs
- name: Setup cache for podman
uses: actions/cache@v4
with:
path: |
/var/lib/containers
key: podman-storage
- name: Check out repository code
uses: actions/checkout@v4
- name: Build container

View File

@ -7,6 +7,7 @@ on:
- go.mod
- go.lock
- go.work
- .gitea/workflows/go-test.yaml
env:
GOPROXY: ${{ vars.GOPROXY }}
@ -19,10 +20,20 @@ jobs:
if: ${{ vars.DEBIAN_MIRROR && vars.DEBIAN_APT_SOURCES }}
- name: Setup Debian environment
run: apt update && apt install -y nodejs
- name: Setup cache for golang toolchain
uses: actions/cache@v4
with:
path: |
/opt/hostedtoolcache/go
/root/go/pkg/mod
/root/.cache/go-build
key: ${{ runner.os }}-golang
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: 1.24.0
cache-dependency-path: |
go.sum
- name: Check out repository code
uses: actions/checkout@v4
- name: Run tests