2026-03-25 09:34:10 -07:00

36 lines
1.2 KiB
YAML

name: Download cache and Upload
# Debug the cache. Example to run:
# KEY=setup-go-Linux-x64-ubuntu24-go-1.25.7-db3f66b86a16be31d89e16ce08f217df90c50b79a7cf6877f62fc3d1fc880727; VERSION="$(gh cache list --json id,key,version -q ".[] | select(.key == \"$KEY\").version")"; gh workflow run debug_cache.yml -f cache_key=$KEY -f version=$VERSION
on:
workflow_dispatch:
inputs:
cache_key:
description: 'Cache key'
required: true
type: string
version:
description: 'Cache hash version'
required: true
type: string
jobs:
cache-upload:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Restore cache
uses: Andrej730/cache/restore@e294f7d180f76c94062d0251c60fe7362ce6667d
with:
path: .
version: ${{ github.event.inputs.version }}
key: ${{ github.event.inputs.cache_key }}
- name: Upload cached folder as artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: cache-artifact
path: |
/home/runner/work/**/*.tzst