3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2026-05-16 01:05:34 +00:00
cache/save/action.yml
Mamon Anaam 233722d848
Implement npm caching in action.yml
Add caching for npm dependencies in GitHub Actions.
2026-05-15 17:57:34 +03:00

31 lines
1 KiB
YAML

name: 'Save a cache'
description: 'Save Cache artifacts like dependencies and build outputs to improve workflow execution time'
author: 'GitHub'
inputs:
path:
description: 'A list of files, directories, and wildcard patterns to cache'
required: true
key:
description: 'An explicit key for saving the cache'
required: true
upload-chunk-size:
description: 'The chunk size used to split up large files during upload, in bytes'
required: false
enableCrossOsArchive:
description: 'An optional boolean when enabled, allows windows runners to save caches that can be restored on other platforms'
default: 'false'
required: false
runs:
using: 'node24'
main: '../dist/save-only/index.js'
branding:
icon: 'archive'
color: 'gray-dark'
- name: Cache
uses: actions/cache@v5.0.5
with:
path: ~/.npm # Example: paths to cache
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} # Example key
restore-keys: |
${{ runner.os }}-node-