@boringcache/action-core 1.0.2 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ npm install @boringcache/action-core
|
|
|
16
16
|
import { ensureBoringCache, execBoringCache } from '@boringcache/action-core';
|
|
17
17
|
|
|
18
18
|
// Ensure the CLI is installed
|
|
19
|
-
await ensureBoringCache({ version: 'v1.0.
|
|
19
|
+
await ensureBoringCache({ version: 'v1.0.2' });
|
|
20
20
|
|
|
21
21
|
// Execute CLI commands
|
|
22
22
|
const exitCode = await execBoringCache(['restore', 'workspace', 'tag:path']);
|
|
@@ -29,7 +29,7 @@ const exitCode = await execBoringCache(['restore', 'workspace', 'tag:path']);
|
|
|
29
29
|
Downloads and installs the BoringCache CLI if not already available.
|
|
30
30
|
|
|
31
31
|
**Options:**
|
|
32
|
-
- `version` (required): Version to install (e.g., `'v1.0.
|
|
32
|
+
- `version` (required): Version to install (e.g., `'v1.0.2'`). Set to `'skip'` to skip installation.
|
|
33
33
|
- `token` (optional): API token (defaults to `BORINGCACHE_API_TOKEN` env var)
|
|
34
34
|
- `cache` (optional): Enable automatic caching across workflow runs (default: `true`)
|
|
35
35
|
|
|
@@ -75,16 +75,16 @@ The CLI is **automatically cached** across workflow runs using `@actions/cache`.
|
|
|
75
75
|
|
|
76
76
|
```typescript
|
|
77
77
|
// First workflow run: downloads CLI and saves to cache
|
|
78
|
-
await ensureBoringCache({ version: 'v1.0.
|
|
78
|
+
await ensureBoringCache({ version: 'v1.0.2' });
|
|
79
79
|
|
|
80
80
|
// Subsequent runs: restores from cache instantly
|
|
81
|
-
await ensureBoringCache({ version: 'v1.0.
|
|
81
|
+
await ensureBoringCache({ version: 'v1.0.2' });
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
To disable automatic caching:
|
|
85
85
|
|
|
86
86
|
```typescript
|
|
87
|
-
await ensureBoringCache({ version: 'v1.0.
|
|
87
|
+
await ensureBoringCache({ version: 'v1.0.2', cache: false });
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
### Manual Cache Control
|
|
@@ -95,7 +95,7 @@ For advanced use cases, you can use `getToolCacheInfo()` to manage caching yours
|
|
|
95
95
|
import * as cache from '@actions/cache';
|
|
96
96
|
import { ensureBoringCache, getToolCacheInfo } from '@boringcache/action-core';
|
|
97
97
|
|
|
98
|
-
const info = getToolCacheInfo('v1.0.
|
|
98
|
+
const info = getToolCacheInfo('v1.0.2');
|
|
99
99
|
console.log(info.cacheKey); // 'boringcache-1.0.0-linux-x64'
|
|
100
100
|
console.log(info.cachePattern); // '/opt/hostedtoolcache/boringcache/1.0.0*'
|
|
101
101
|
console.log(info.cachePath); // Path if cached, null otherwise
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boringcache/action-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Shared core library for BoringCache GitHub Actions",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,12 +14,11 @@
|
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "git+https://github.com/boringcache/
|
|
18
|
-
"directory": "action-core"
|
|
17
|
+
"url": "git+https://github.com/boringcache/action-core.git"
|
|
19
18
|
},
|
|
20
|
-
"homepage": "https://github.com/boringcache/
|
|
19
|
+
"homepage": "https://github.com/boringcache/action-core#readme",
|
|
21
20
|
"bugs": {
|
|
22
|
-
"url": "https://github.com/boringcache/
|
|
21
|
+
"url": "https://github.com/boringcache/action-core/issues"
|
|
23
22
|
},
|
|
24
23
|
"keywords": [
|
|
25
24
|
"boringcache",
|
|
@@ -41,7 +40,8 @@
|
|
|
41
40
|
"@actions/cache": "^4.1.0",
|
|
42
41
|
"@actions/core": "^1.11.1",
|
|
43
42
|
"@actions/exec": "^1.1.1",
|
|
44
|
-
"@actions/tool-cache": "^2.0.1"
|
|
43
|
+
"@actions/tool-cache": "^2.0.1",
|
|
44
|
+
"@boringcache/action-core": "^1.0.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/jest": "^29.5.14",
|