mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-03 12:34:34 +00:00
4f363d2748
Cache saves have been rejected since June because the repo sat above its 10 GB allowance, so every PR run fell back to a cache built with an older toolchain and rebuilt the backend from scratch. - go version in the `gobuild` and `golint` keys and `restore-keys` - seeder triggers on `go.mod` and gained `workflow_dispatch` - single writer for the `gomod` cache, the two were racing - new daily `cache-prune` workflow holding the total under a limit - `cache: false` for `setup-go` in release and cron workflows, it held 815 MB - add `workflow_dispatch` so the cache workflows can be triggered on-demand Assisted-by: Claude Code:claude-opus-5
27 lines
683 B
YAML
27 lines
683 B
YAML
name: go-setup
|
|
description: Set up go and restore caches
|
|
|
|
inputs:
|
|
cache:
|
|
description: Restore go caches
|
|
default: "true"
|
|
lint-cache:
|
|
description: Also restore the golangci-lint cache
|
|
default: "false"
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- uses: ./.github/actions/free-disk-space
|
|
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
|
|
id: setup-go
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
cache: false
|
|
- if: ${{ inputs.cache == 'true' }}
|
|
uses: ./.github/actions/go-cache
|
|
with:
|
|
go-version: ${{ steps.setup-go.outputs.go-version }}
|
|
lint-cache: ${{ inputs.lint-cache }}
|