Skip to content

Go Mod Cache

Go Mod Cache #12

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Go Mod Cache
on:
push:
branches:
- main
paths:
- go.mod
- go.sum
schedule:
- cron: 0 0 * * 0
workflow_dispatch:
permissions:
contents: read
jobs:
go-cache:
name: Go Module Cache
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Mise
uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4
with:
experimental: true
install_args: --locked
- name: Cache Go Modules
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
- name: Download Go Modules
run: go mod download