mirror of
https://github.com/actions/cache.git
synced 2026-04-24 08:04:41 +00:00
Port GCS support from danySam/gcs-cache. When gcs-bucket input is set, cache to Google Cloud Storage via Application Default Credentials; else fall back to GitHub's cache service transparently. - New inputs: gcs-bucket, gcs-path-prefix (default: github-cache) - New src/utils/gcsCache.ts wraps @actions/cache restore/save - restoreImpl/saveImpl swap @actions/cache import for local wrapper - Adds @google-cloud/storage ^7.16.0, bumps typescript to ^5.8.3 - Regenerated dist/ via npm run build Skipped: upstream workflow removals, README/examples/RELEASES churn, licensed/codeql config, GCS integration-test workflow.
31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
name: 'Save Cache with GCS Support'
|
|
description: 'Save cache artifacts to Google Cloud Storage or GitHub with automatic fallback'
|
|
author: 'danySam'
|
|
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
|
|
gcs-bucket:
|
|
description: 'Google Cloud Storage bucket name to use for caching. When provided, GCS will be used as the cache backend.'
|
|
required: false
|
|
gcs-path-prefix:
|
|
description: 'Optional prefix path within the GCS bucket for cache files'
|
|
default: 'github-cache'
|
|
required: false
|
|
runs:
|
|
using: 'node20'
|
|
main: '../dist/save-only/index.js'
|
|
branding:
|
|
icon: 'archive'
|
|
color: 'gray-dark'
|