Compare commits

...

48 commits
0.15.0 ... main

Author SHA1 Message Date
renovate[bot]
30962902d2
chore(deps): update node.js to v24.14.0 (#147)
Some checks are pending
CI / setup-bazel (macos) (push) Waiting to run
CI / setup-bazel (ubuntu) (push) Waiting to run
CI / setup-bazel (windows) (push) Waiting to run
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-25 07:27:53 -08:00
Nick Nichols
417f3387fe
Fix syntax error in README.md for disk-cache (#146) 2026-02-23 10:15:09 -08:00
renovate[bot]
887da5f6b9
chore(deps): update node.js to v24.13.1 (#145)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-10 11:04:30 -08:00
renovate[bot]
3217c4f420
fix(deps): update dependency @actions/tool-cache to v4 (#143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-06 06:49:57 -08:00
renovate[bot]
18fd541ab1
fix(deps): update dependency @actions/core to v3 (#141)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-05 21:43:13 -08:00
renovate[bot]
e74b1abaf7
fix(deps): update dependency @actions/github to v9 (#140)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-05 21:41:13 -08:00
renovate[bot]
3af227a251
chore(deps): update dependency @actions/tool-cache to v3.0.1 (#139)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-05 21:41:05 -08:00
renovate[bot]
c9a2a71272
fix(deps): update dependency @actions/glob to ^0.6.0 (#142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-05 21:37:59 -08:00
renovate[bot]
09d5e77e57
fix(deps): update dependency @actions/cache to v6 (#144)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-05 21:37:52 -08:00
renovate[bot]
5a2f9a2f05
fix(deps): update dependency @actions/github to v8 (#134)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-26 15:31:48 -08:00
renovate[bot]
bb67c3ebd7
chore(deps): update dependency @actions/cache to v5.0.3 (#133)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-16 06:54:32 -08:00
renovate[bot]
b6a8ab687e
chore(deps): update node.js to v24.13.0 (#132)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-14 18:30:30 -08:00
github-actions
083175551c Release 0.18.0 2026-01-11 16:34:54 +00:00
Michael Vorburger
b607b8f591
Add post-if !cancelled() condition (#128) 2026-01-11 08:33:54 -08:00
Titus Fortner
be4ac32ff6
allow saving cache to be optional (#131) 2026-01-11 08:30:32 -08:00
github-actions
00e306f4a9 Release 0.17.0 2026-01-10 20:28:13 +00:00
Xavier Bonaventura
b26a6f0e11
Fix bazel version not working with disk cache (#119) 2026-01-10 12:27:24 -08:00
renovate[bot]
dbfe7273a9
fix(deps): update dependency @actions/github to v7 (#129)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-08 12:20:35 -08:00
renovate[bot]
1dc7f4819d
fix(deps): update dependency @actions/tool-cache to v3 (#130)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-08 12:20:27 -08:00
Michael Vorburger
82d28f5023
fix: add logging when failing to restore cache (#127)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-08 11:48:02 -08:00
Michael Vorburger
1bf89734c9
docs: add missing initial "npm install" to Development on README (#126) 2026-01-08 11:46:54 -08:00
renovate[bot]
e820d6a037
chore(deps): update dependency @actions/cache to v5.0.2 (#123)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-08 09:27:50 -08:00
renovate[bot]
66d3c1cddb
chore(deps): update dependency @actions/core to v2.0.2 (#124)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-08 09:27:28 -08:00
Michael Vorburger
271e4c2614
fix: Improve error handling in restoreCache (fixes #120) (#122)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-01-08 09:25:30 -08:00
github-actions
43d7d5ceab Release 0.16.0 2025-12-16 16:03:21 +00:00
Karthik Sethuraman
905421c656
allow a list of files for repositoryCacheConfig (#117)
---------
Co-authored-by: Karthik Sethuraman <ksethuraman@linkedin.com>
2025-12-16 08:02:30 -08:00
renovate[bot]
5528b8082a
Update dependency @actions/cache to v5 (#115)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 08:02:25 -08:00
renovate[bot]
39aba44572
Update dependency @actions/core to v2 (#113)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 08:01:32 -08:00
renovate[bot]
51f283a17f
Update Node.js to v24.12.0 (#114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 08:01:26 -08:00
Leo Contreras
7594e1b588
Pulling of external-cache parallellized (#110) 2025-12-04 07:26:59 -08:00
renovate[bot]
1ff8ab47ae
Update Node.js to v24 (#106)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-04 07:15:14 -08:00
renovate[bot]
6fe279591f
Update actions/checkout action to v6 (#109)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-04 07:14:46 -08:00
renovate[bot]
81ef0d9acc
Update dependency yaml to v2.8.2 (#112)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-04 07:14:32 -08:00
renovate[bot]
4432ac8a23
Update actions/setup-node action to v6 (#104)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-14 06:42:37 -07:00
renovate[bot]
2fab424f7c
Update dependency @vercel/ncc to v0.38.4 (#99)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-30 08:35:48 -07:00
renovate[bot]
798f81ecfc
Update Node.js to v22.20.0 (#103)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-30 08:35:44 -07:00
renovate[bot]
22f06fe4d3
Update dependency @actions/cache to v4.1.0 (#102)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-30 08:35:31 -07:00
renovate[bot]
812c6371ef
Update actions/setup-node action to v5 (#98)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-08 13:37:26 -07:00
renovate[bot]
f22529d52b
Update Node.js to v22.19.0 (#97)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-31 07:45:02 -07:00
renovate[bot]
b1c5ac5231
Update actions/checkout action to v5 (#95)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-11 09:08:54 -07:00
renovate[bot]
b02abd0245
Update dependency @actions/cache to v4.0.5 (#94)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-08 08:49:06 -07:00
renovate[bot]
ec193958e9
Update Node.js to v22.18.0 (#93)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-05 07:15:59 -07:00
renovate[bot]
25ec8ddd82
Update dependency yaml to v2.8.1 (#92)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-05 07:15:51 -07:00
Malte Poll
54c9086be8
Include architecture in cache key (#91)
Otherwise, running tests on macos-13 and macos-15 uses the same cache key for Intel and Apple Silicon.

Note: I had some trouble regenerating the `dist` without introducing huge changes in the output. For that reason I skipped updating `index.js.map`.
2025-08-05 06:42:41 -07:00
renovate[bot]
20a70d3f31
Update Node.js to v22.17.1 (#89) 2025-07-16 14:08:46 -07:00
renovate[bot]
4d8cee1d8a
Update dependency @actions/github to v6.0.1 (#85) 2025-06-28 08:04:16 -07:00
renovate[bot]
3d67a4f0cf
Update dependency yaml to v2.8.0 (#86) 2025-06-28 08:04:02 -07:00
renovate[bot]
976e823acb
Update Node.js to v22.17.0 (#87) 2025-06-28 08:01:54 -07:00
14 changed files with 103436 additions and 100094 deletions

View file

@ -19,7 +19,7 @@ jobs:
- ubuntu - ubuntu
- windows - windows
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: ./ - uses: ./
- if: failure() && runner.debug == '1' - if: failure() && runner.debug == '1'
uses: mxschmitt/action-tmate@v3 uses: mxschmitt/action-tmate@v3

View file

@ -15,8 +15,8 @@ jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-node@v4 - uses: actions/setup-node@v6
with: with:
cache: npm cache: npm
node-version-file: package.json node-version-file: package.json

View file

@ -1 +1 @@
nodejs 22.14.0 nodejs 24.14.0

View file

@ -6,7 +6,7 @@ and provides an advanced fine-grained caching to improve workflows performance.
## Usage ## Usage
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
# Avoid downloading Bazel every time. # Avoid downloading Bazel every time.
bazelisk-cache: true bazelisk-cache: true
@ -39,7 +39,7 @@ Default `""`.
#### Install Bazelisk 1.x #### Install Bazelisk 1.x
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
bazelisk-version: 1.x bazelisk-version: 1.x
``` ```
@ -47,7 +47,7 @@ Default `""`.
#### Install exact Bazelisk version #### Install exact Bazelisk version
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
bazelisk-version: 1.19.0 bazelisk-version: 1.19.0
``` ```
@ -67,7 +67,7 @@ Default `""`.
#### Enable Bzlmod #### Enable Bzlmod
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
bazelrc: common --enable_bzlmod bazelrc: common --enable_bzlmod
``` ```
@ -75,7 +75,7 @@ Default `""`.
#### Add colors and timestamps #### Add colors and timestamps
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
bazelrc: | bazelrc: |
build --color=yes build --color=yes
@ -83,6 +83,30 @@ Default `""`.
``` ```
</details> </details>
### `cache-save`
Whether to save caches at the end of the workflow.
Set to `false` for pull requests to allow cache restoration without saving,
which prevents PRs from polluting the cache while still benefiting from it.
Default `true`.
<details>
<summary>Examples</summary>
#### Disable cache saving on pull requests
```yaml
- uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
cache-save: ${{ github.event_name != 'pull_request' }}
```
</details>
### `disk-cache` ### `disk-cache`
Enable [`disk_cache`][2] and store it on GitHub based on contents of `BUILD` files. Enable [`disk_cache`][2] and store it on GitHub based on contents of `BUILD` files.
@ -97,7 +121,7 @@ Default `false`.
#### Share a single disk cache #### Share a single disk cache
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
disk-cache: true disk-cache: true
``` ```
@ -105,9 +129,9 @@ Default `false`.
#### Separate disk caches between workflows #### Separate disk caches between workflows
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
disk-cache: ${{ github.workflow }}} disk-cache: ${{ github.workflow }}
``` ```
</details> </details>
@ -129,7 +153,7 @@ Default `false`.
#### Enable external repositories caches #### Enable external repositories caches
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
external-cache: true external-cache: true
``` ```
@ -137,7 +161,7 @@ Default `false`.
#### Cache NPM repositories based on `package-lock.json` contents #### Cache NPM repositories based on `package-lock.json` contents
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
external-cache: | external-cache: |
manifest: manifest:
@ -147,7 +171,7 @@ Default `false`.
#### Do not cache Ruby on Windows #### Do not cache Ruby on Windows
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
external-cache: | external-cache: |
manifest: manifest:
@ -167,7 +191,7 @@ Default `""`.
#### Authenticate via key #### Authenticate via key
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
google-credentials: ${{ secrets.GOOGLE_CLOUD_KEY }} google-credentials: ${{ secrets.GOOGLE_CLOUD_KEY }}
``` ```
@ -198,7 +222,7 @@ Default is one of the following:
#### Use `C` drive letter #### Use `C` drive letter
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
output-base: C:/_bazel output-base: C:/_bazel
``` ```
@ -218,7 +242,7 @@ Default `false`.
#### Store a single repository cache #### Store a single repository cache
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
repository-cache: true repository-cache: true
``` ```
@ -226,10 +250,19 @@ Default `false`.
#### Store a repository cache from a custom location #### Store a repository cache from a custom location
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.15.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
repository-cache: examples/gem/WORKSPACE repository-cache: examples/gem/WORKSPACE
``` ```
#### Store a repository cache from a list of custom locations
```yaml
- uses: bazel-contrib/setup-bazel@0.18.0
with:
repository-cache: |
- MODULE.bazel
- requirements_locked.txt
```
</details> </details>
## Migrating from [`bazelbuild/setup-bazelisk`][6] ## Migrating from [`bazelbuild/setup-bazelisk`][6]
@ -243,6 +276,7 @@ However, if you used a `bazel-version` input before, you will need to remove it
To build action, run the following command: To build action, run the following command:
```sh ```sh
$ npm install
$ npm run build $ npm run build
``` ```

View file

@ -13,6 +13,10 @@ inputs:
description: Extra contents to write to user .bazelrc description: Extra contents to write to user .bazelrc
required: false required: false
default: "" default: ""
cache-save:
description: Whether to save caches. Set to false for pull requests to allow restores but prevent saves.
required: false
default: "true"
cache-version: cache-version:
description: Version of all caches description: Version of all caches
required: false required: false
@ -50,3 +54,4 @@ runs:
using: node20 using: node20
main: dist/main/index.js main: dist/main/index.js
post: dist/post/index.js post: dist/post/index.js
post-if: "!cancelled()"

View file

@ -5,8 +5,8 @@ const core = require('@actions/core')
const github = require('@actions/github') const github = require('@actions/github')
const bazeliskVersion = core.getInput('bazelisk-version') const bazeliskVersion = core.getInput('bazelisk-version')
const cacheSave = core.getBooleanInput('cache-save')
const cacheVersion = core.getInput('cache-version') const cacheVersion = core.getInput('cache-version')
const externalCacheConfig = yaml.parse(core.getInput('external-cache'))
const moduleRoot = core.getInput('module-root') const moduleRoot = core.getInput('module-root')
const homeDir = os.homedir() const homeDir = os.homedir()
@ -46,21 +46,24 @@ switch (platform) {
break break
} }
const baseCacheKey = `setup-bazel-${cacheVersion}-${platform}` const baseCacheKey = `setup-bazel-${cacheVersion}-${platform}-${arch}`
const bazelrc = core.getMultilineInput('bazelrc') const bazelrc = core.getMultilineInput('bazelrc')
const diskCacheConfig = core.getInput('disk-cache') const diskCacheConfig = core.getInput('disk-cache')
const diskCacheEnabled = diskCacheConfig !== 'false' const diskCacheEnabled = diskCacheConfig !== 'false'
let diskCacheName = 'disk' let diskCacheName = 'disk'
if (diskCacheEnabled) { if (diskCacheEnabled) {
bazelrc.push(`common --disk_cache=${bazelDisk}`) // Before Bazel 6.3, providing --disk_cache to common is an error,
// with Bazel 6.3 and onwards, common accepts any legal Bazel option
// https://github.com/bazelbuild/bazel/issues/3054
bazelrc.push(`build --disk_cache=${bazelDisk}`)
if (diskCacheName !== 'true') { if (diskCacheName !== 'true') {
diskCacheName = `${diskCacheName}-${diskCacheConfig}` diskCacheName = `${diskCacheName}-${diskCacheConfig}`
} }
} }
const repositoryCacheConfig = core.getInput('repository-cache') const repositoryCacheConfig = yaml.parse(core.getInput('repository-cache'))
const repositoryCacheEnabled = repositoryCacheConfig !== 'false' const repositoryCacheEnabled = repositoryCacheConfig !== false
let repositoryCacheFiles = [ let repositoryCacheFiles = [
`${moduleRoot}/MODULE.bazel`, `${moduleRoot}/MODULE.bazel`,
`${moduleRoot}/WORKSPACE.bazel`, `${moduleRoot}/WORKSPACE.bazel`,
@ -69,7 +72,7 @@ let repositoryCacheFiles = [
] ]
if (repositoryCacheEnabled) { if (repositoryCacheEnabled) {
bazelrc.push(`common --repository_cache=${bazelRepository}`) bazelrc.push(`common --repository_cache=${bazelRepository}`)
if (repositoryCacheConfig !== 'true') { if (repositoryCacheConfig !== true) {
repositoryCacheFiles = Array(repositoryCacheConfig).flat() repositoryCacheFiles = Array(repositoryCacheConfig).flat()
} }
} }
@ -84,6 +87,7 @@ if (googleCredentials.length > 0 && !googleCredentialsSaved) {
core.saveState('google-credentials-path', googleCredentialsPath) core.saveState('google-credentials-path', googleCredentialsPath)
} }
const externalCacheConfig = yaml.parse(core.getInput('external-cache'))
const bazelExternal = core.toPosixPath(`${bazelOutputBase}/external`) const bazelExternal = core.toPosixPath(`${bazelOutputBase}/external`)
const externalCache = {} const externalCache = {}
if (externalCacheConfig) { if (externalCacheConfig) {
@ -134,6 +138,7 @@ core.exportVariable('BAZELISK_GITHUB_TOKEN', token)
module.exports = { module.exports = {
baseCacheKey, baseCacheKey,
cacheSave,
bazeliskCache: { bazeliskCache: {
enabled: core.getBooleanInput('bazelisk-cache'), enabled: core.getBooleanInput('bazelisk-cache'),
files: [`${moduleRoot}/.bazelversion`], files: [`${moduleRoot}/.bazelversion`],

102055
dist/main/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

99746
dist/post/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -133,14 +133,16 @@ async function restoreExternalCaches(cacheConfig) {
// Now restore all external caches defined in manifest // Now restore all external caches defined in manifest
if (fs.existsSync(path)) { if (fs.existsSync(path)) {
const manifest = fs.readFileSync(path, { encoding: 'utf8' }) const manifest = fs.readFileSync(path, { encoding: 'utf8' })
for (const name of manifest.split('\n').filter(s => s)) { const restorePromises = manifest.split('\n').filter(s => s)
await restoreCache({ .map(name => {
return restoreCache({
enabled: cacheConfig[name]?.enabled ?? cacheConfig.default.enabled, enabled: cacheConfig[name]?.enabled ?? cacheConfig.default.enabled,
files: cacheConfig[name]?.files || cacheConfig.default.files, files: cacheConfig[name]?.files || cacheConfig.default.files,
name: cacheConfig.default.name(name), name: cacheConfig.default.name(name),
paths: cacheConfig.default.paths(name) paths: cacheConfig.default.paths(name)
}) });
} });
await Promise.all(restorePromises);
} }
} }
@ -150,9 +152,10 @@ async function restoreCache(cacheConfig) {
} }
const delay = Math.random() * 1000 // timeout <= 1 sec to reduce 429 errors const delay = Math.random() * 1000 // timeout <= 1 sec to reduce 429 errors
await setTimeout(delay, async function () { await setTimeout(delay)
core.startGroup(`Restore cache for ${cacheConfig.name}`)
core.startGroup(`Restore cache for ${cacheConfig.name}`)
try {
const hash = await glob.hashFiles(cacheConfig.files.join('\n')) const hash = await glob.hashFiles(cacheConfig.files.join('\n'))
const name = cacheConfig.name const name = cacheConfig.name
const paths = cacheConfig.paths const paths = cacheConfig.paths
@ -175,9 +178,11 @@ async function restoreCache(cacheConfig) {
} else { } else {
core.info(`Failed to restore ${name} cache`) core.info(`Failed to restore ${name} cache`)
} }
} catch (err) {
core.warning(`Failed to restore ${name} cache with error: ${err}`)
} finally {
core.endGroup() core.endGroup()
}()) }
} }
run() run()

1037
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,10 @@
{ {
"name": "setup-bazel", "name": "setup-bazel",
"version": "0.15.0", "version": "0.18.0",
"description": "Install and configure Bazel for GitHub Actions", "description": "Install and configure Bazel for GitHub Actions",
"main": "index.js", "main": "index.js",
"engines": { "engines": {
"node": "22.x" "node": "24.x"
}, },
"scripts": { "scripts": {
"build": "ncc build index.js -s -o dist/main && ncc build post.js -s -o dist/post", "build": "ncc build index.js -s -o dist/main && ncc build post.js -s -o dist/post",
@ -13,11 +13,11 @@
"author": "Alex Rodionov <p0deje@gmail.com>", "author": "Alex Rodionov <p0deje@gmail.com>",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^4.0.0", "@actions/cache": "^6.0.0",
"@actions/core": "^1.10.1", "@actions/core": "^3.0.0",
"@actions/github": "^6.0.0", "@actions/github": "^9.0.0",
"@actions/glob": "^0.5.0", "@actions/glob": "^0.6.0",
"@actions/tool-cache": "^2.0.1", "@actions/tool-cache": "^4.0.0",
"@vercel/ncc": "^0.38.0", "@vercel/ncc": "^0.38.0",
"yaml": "^2.2.1" "yaml": "^2.2.1"
} }

View file

@ -13,6 +13,11 @@ async function run() {
} }
async function saveCaches() { async function saveCaches() {
if (!config.cacheSave) {
core.info('Cache saving is disabled (cache-save: false)')
return
}
await saveCache(config.bazeliskCache) await saveCache(config.bazeliskCache)
await saveCache(config.diskCache) await saveCache(config.diskCache)
await saveCache(config.repositoryCache) await saveCache(config.repositoryCache)