mirror of
https://github.com/actions/cache.git
synced 2026-03-10 09:01:46 +08:00
Compare commits
4 Commits
b6801295cc
...
1c3b4952aa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c3b4952aa | ||
|
|
638ed79f9d | ||
|
|
3862dccb17 | ||
|
|
44401f0ae6 |
51
.github/workflows/npm-gulp.yml
vendored
Normal file
51
.github/workflows/npm-gulp.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v4.2.3
|
||||||
|
with:
|
||||||
|
# A list of files, directories, and wildcard patterns to cache and restore
|
||||||
|
path:
|
||||||
|
# An explicit key for restoring and saving the cache
|
||||||
|
key:
|
||||||
|
# An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.
|
||||||
|
restore-keys: # optional
|
||||||
|
# The chunk size used to split up large files during upload, in bytes
|
||||||
|
upload-chunk-size: # optional
|
||||||
|
# An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms
|
||||||
|
enableCrossOsArchive: # optional, default is false
|
||||||
|
# Fail the workflow if cache entry is not found
|
||||||
|
fail-on-cache-miss: # optional, default is false
|
||||||
|
# Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache
|
||||||
|
lookup-only: # optional, default is false
|
||||||
|
# Run the post step to save the cache even if another step before fails
|
||||||
|
save-always: # optional, default is false
|
||||||
|
|
||||||
|
|
||||||
|
name: NodeJS with Gulp
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [18.x, 20.x, 22.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
gulp
|
||||||
|
|
||||||
|
|
||||||
@ -19,16 +19,19 @@ See ["Caching dependencies to speed up workflows"](https://docs.github.com/en/ac
|
|||||||
|
|
||||||
The cache backend service has been rewritten from the ground up for improved performance and reliability. [actions/cache](https://github.com/actions/cache) now integrates with the new cache service (v2) APIs.
|
The cache backend service has been rewritten from the ground up for improved performance and reliability. [actions/cache](https://github.com/actions/cache) now integrates with the new cache service (v2) APIs.
|
||||||
|
|
||||||
The new service will gradually roll out as of **February 1st, 2025**. The legacy service will also be sunset on the same date. Changes in these release are **fully backward compatible**.
|
The new service will gradually roll out as of **February 1st, 2025**. The legacy service will also be sunset on the same date. Changes in these releases are **fully backward compatible**.
|
||||||
|
|
||||||
**We are deprecating some versions of this action**. We recommend upgrading to version `v4` or `v3` as soon as possible before **February 1st, 2025.** (Upgrade instructions below).
|
**We are deprecating some versions of this action**. We recommend upgrading to version `v4` or `v3` as soon as possible before **February 1st, 2025.** (Upgrade instructions below).
|
||||||
|
|
||||||
If you are using pinned SHAs, please use the SHAs of versions `v4.2.0` or `v3.4.0`
|
If you are using pinned SHAs, please use the SHAs of versions `v4.2.0` or `v3.4.0`.
|
||||||
|
|
||||||
If you do not upgrade, all workflow runs using any of the deprecated [actions/cache](https://github.com/actions/cache) will fail.
|
If you do not upgrade, all workflow runs using any of the deprecated [actions/cache](https://github.com/actions/cache) will fail.
|
||||||
|
|
||||||
Upgrading to the recommended versions will not break your workflows.
|
Upgrading to the recommended versions will not break your workflows.
|
||||||
|
|
||||||
|
> **Additionally, if you are managing your own GitHub runners, you must update your runner version to `2.231.0` or newer to ensure compatibility with the new cache service.**
|
||||||
|
> Failure to update both the action version and your runner version may result in workflow failures after the migration date.
|
||||||
|
|
||||||
Read more about the change & access the migration guide: [reference to the announcement](https://github.com/actions/cache/discussions/1510).
|
Read more about the change & access the migration guide: [reference to the announcement](https://github.com/actions/cache/discussions/1510).
|
||||||
|
|
||||||
### v4
|
### v4
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user