Files
ci-cache/action.yml
T
2026-11-05 02:54:20 +00:00

21 lines
805 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: ci-cache
description: "還原與儲存 CI 的快取目錄(預設 workspace 的 .ci-home:Go 模組與建置快取、npm、工具鏈、rod 下載的 Chromium)。包一層 actions/cache,要在 checkout 之後使用;key 由呼叫端用 hashFiles 算好傳入"
inputs:
key:
description: "快取 key,例如 ci-home-${{ hashFiles('go.sum', 'web/package-lock.json') }}"
required: true
restore_keys:
description: "找不到完全相同的 key 時,依序嘗試的前綴(每行一個),例如 ci-home-"
default: ""
path:
description: "要快取的路徑"
default: .ci-home
runs:
using: composite
steps:
- uses: actions/cache@v4
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore_keys }}