Compare commits

...

8 Commits

Author SHA1 Message Date
Marcus Boerger
1134ac40c0
Merge 9365bab5e5 into 27d5ce7f10 2026-04-20 15:16:49 +00:00
Yang Cao
27d5ce7f10
Merge pull request #1747 from actions/yacaovsnc/update-dependency
Some checks failed
Check dist content / Check dist/ (push) Has been cancelled
Code scanning / CodeQL-Build (push) Has been cancelled
License check / Check licenses (push) Has been cancelled
Tests / build (macOS-latest) (push) Has been cancelled
Tests / build (ubuntu-latest) (push) Has been cancelled
Tests / build (windows-latest) (push) Has been cancelled
Tests / test-save (macOS-latest) (push) Has been cancelled
Tests / test-save (ubuntu-latest) (push) Has been cancelled
Tests / test-save (windows-latest) (push) Has been cancelled
Tests / test-proxy-save (push) Has been cancelled
Tests / test-restore (macOS-latest) (push) Has been cancelled
Tests / test-restore (ubuntu-latest) (push) Has been cancelled
Tests / test-restore (windows-latest) (push) Has been cancelled
Tests / test-proxy-restore (push) Has been cancelled
Update ts-http-runtime dependency
2026-04-13 11:36:02 -04:00
Yang Cao
f280785d7b licensed changes 2026-04-13 11:30:08 -04:00
Yang Cao
619aeb1606 npm run build generated dist files 2026-04-13 11:17:26 -04:00
Yang Cao
bcf16c2893 Update ts-http-runtime to 0.3.5 2026-04-13 11:14:40 -04:00
Marcus Boerger
9365bab5e5
Update action.yml
Co-authored-by: Kyle Ross <37418852+Rossbro2@users.noreply.github.com>
2025-05-21 21:40:49 +02:00
Marcus Boerger
25ee7a8ae9
Update README.md
Co-authored-by: Kyle Ross <37418852+Rossbro2@users.noreply.github.com>
2025-05-21 21:40:39 +02:00
helly25
40b3745dc1
Add new setting save-on-success.
* Proposal to implement https://github.com/actions/cache/issues/1570
2025-04-25 15:45:16 +02:00
8 changed files with 17035 additions and 14449 deletions

Binary file not shown.

View File

@ -90,6 +90,7 @@ If you are using a `self-hosted` Windows runner, `GNU tar` and `zstd` are requir
* `enableCrossOsArchive` - An optional boolean when enabled, allows Windows runners to save or restore caches that can be restored or saved respectively on other platforms. Default: `false` * `enableCrossOsArchive` - An optional boolean when enabled, allows Windows runners to save or restore caches that can be restored or saved respectively on other platforms. Default: `false`
* `fail-on-cache-miss` - Fail the workflow if cache entry is not found. Default: `false` * `fail-on-cache-miss` - Fail the workflow if cache entry is not found. Default: `false`
* `lookup-only` - If true, only checks if cache entry exists and skips download. Does not change save cache behavior. Default: `false` * `lookup-only` - If true, only checks if cache entry exists and skips download. Does not change save cache behavior. Default: `false`
* `save-on-success` - If true, then the cache is written in the post action on success, or (if false) the cache will only be restored if available. Default: `true`
#### Environment Variables #### Environment Variables

View File

@ -26,13 +26,18 @@ inputs:
description: 'Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache' description: 'Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache'
default: 'false' default: 'false'
required: false required: false
save-on-success:
description: 'Whether the cache is written in the post action on success or (if false) is only restored'
default: 'true'
required: false
save-always: save-always:
description: 'Run the post step to save the cache even if another step before fails' description: 'Run the post step to save the cache even if another step before fails'
default: 'false' default: 'false'
required: false required: false
deprecationMessage: | deprecationMessage: |
save-always does not work as intended and will be removed in a future release. save-always does not work as intended and will be removed in a future release.
A separate `actions/cache/restore` step should be used instead. If you only want to control whether a new cache will be written use `save-on-success` instead.
Otherwise a separate `actions/cache/restore` step should be used instead.
See https://github.com/actions/cache/tree/main/save#always-save-cache for more details. See https://github.com/actions/cache/tree/main/save#always-save-cache for more details.
outputs: outputs:
cache-hit: cache-hit:
@ -41,7 +46,7 @@ runs:
using: 'node24' using: 'node24'
main: 'dist/restore/index.js' main: 'dist/restore/index.js'
post: 'dist/save/index.js' post: 'dist/save/index.js'
post-if: "success()" post-if: "success() && github.event.inputs.save-on-success"
branding: branding:
icon: 'archive' icon: 'archive'
color: 'gray-dark' color: 'gray-dark'

File diff suppressed because it is too large Load Diff

7867
dist/restore/index.js vendored

File diff suppressed because it is too large Load Diff

7867
dist/save-only/index.js vendored

File diff suppressed because it is too large Load Diff

7867
dist/save/index.js vendored

File diff suppressed because it is too large Load Diff

6
package-lock.json generated
View File

@ -1945,9 +1945,9 @@
} }
}, },
"node_modules/@typespec/ts-http-runtime": { "node_modules/@typespec/ts-http-runtime": {
"version": "0.3.2", "version": "0.3.5",
"resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.2.tgz", "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.5.tgz",
"integrity": "sha512-IlqQ/Gv22xUC1r/WQm4StLkYQmaaTsXAhUVsNE0+xiyf0yRFiH5++q78U3bw6bLKDCTmh0uqKB9eG9+Bt75Dkg==", "integrity": "sha512-yURCknZhvywvQItHMMmFSo+fq5arCUIyz/CVk7jD89MSai7dkaX8ufjCWp3NttLojoTVbcE72ri+be/TnEbMHw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"http-proxy-agent": "^7.0.0", "http-proxy-agent": "^7.0.0",