Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8f276a715 | ||
|
|
d156bcaa78 | ||
|
|
5ae4c5be28 | ||
|
|
d50f1ac1b9 | ||
|
|
87cb7035bb | ||
|
|
1b1e81526b | ||
|
|
525ebf0c50 | ||
|
|
07341e11d8 | ||
|
|
930c890727 | ||
|
|
857c61a9df | ||
|
|
514314311c |
@@ -24,7 +24,7 @@ The GitHub Actions ToolKit provides a set of packages to make creating actions e
|
|||||||
Provides functions for inputs, outputs, results, logging, secrets and variables. Read more [here](packages/core)
|
Provides functions for inputs, outputs, results, logging, secrets and variables. Read more [here](packages/core)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install @actions/core
|
npm install @actions/core
|
||||||
```
|
```
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ $ npm install @actions/core
|
|||||||
Provides functions to exec cli tools and process output. Read more [here](packages/exec)
|
Provides functions to exec cli tools and process output. Read more [here](packages/exec)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install @actions/exec
|
npm install @actions/exec
|
||||||
```
|
```
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ $ npm install @actions/exec
|
|||||||
Provides functions to search for files matching glob patterns. Read more [here](packages/glob)
|
Provides functions to search for files matching glob patterns. Read more [here](packages/glob)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install @actions/glob
|
npm install @actions/glob
|
||||||
```
|
```
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ $ npm install @actions/glob
|
|||||||
A lightweight HTTP client optimized for building actions. Read more [here](packages/http-client)
|
A lightweight HTTP client optimized for building actions. Read more [here](packages/http-client)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install @actions/http-client
|
npm install @actions/http-client
|
||||||
```
|
```
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ $ npm install @actions/http-client
|
|||||||
Provides disk i/o functions like cp, mv, rmRF, which etc. Read more [here](packages/io)
|
Provides disk i/o functions like cp, mv, rmRF, which etc. Read more [here](packages/io)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install @actions/io
|
npm install @actions/io
|
||||||
```
|
```
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ Provides functions for downloading and caching tools. e.g. setup-* actions. Rea
|
|||||||
See @actions/cache for caching workflow dependencies.
|
See @actions/cache for caching workflow dependencies.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install @actions/tool-cache
|
npm install @actions/tool-cache
|
||||||
```
|
```
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ $ npm install @actions/tool-cache
|
|||||||
Provides an Octokit client hydrated with the context that the current action is being run in. Read more [here](packages/github)
|
Provides an Octokit client hydrated with the context that the current action is being run in. Read more [here](packages/github)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install @actions/github
|
npm install @actions/github
|
||||||
```
|
```
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ $ npm install @actions/github
|
|||||||
Provides functions to interact with actions artifacts. Read more [here](packages/artifact)
|
Provides functions to interact with actions artifacts. Read more [here](packages/artifact)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install @actions/artifact
|
npm install @actions/artifact
|
||||||
```
|
```
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ $ npm install @actions/artifact
|
|||||||
Provides functions to cache dependencies and build outputs to improve workflow execution time. Read more [here](packages/cache)
|
Provides functions to cache dependencies and build outputs to improve workflow execution time. Read more [here](packages/cache)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install @actions/cache
|
npm install @actions/cache
|
||||||
```
|
```
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ $ npm install @actions/cache
|
|||||||
Provides functions to write attestations for workflow artifacts. Read more [here](packages/attest)
|
Provides functions to write attestations for workflow artifacts. Read more [here](packages/attest)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install @actions/attest
|
npm install @actions/attest
|
||||||
```
|
```
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
### 2.2.2
|
### 2.2.2
|
||||||
|
|
||||||
- Default concurrency to 5 for uploading artifacts [#1962](https://github.com/actions/toolkit/pull/1962
|
- Default concurrency to 5 for uploading artifacts [#1962](https://github.com/actions/toolkit/pull/1962)
|
||||||
|
|
||||||
### 2.2.1
|
### 2.2.1
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -3,10 +3,13 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
const filePath = process.env[`GITHUB_ENV`]
|
const filePath = process.env[`GITHUB_ENV`]
|
||||||
fs.appendFileSync(filePath, `ACTIONS_RUNTIME_TOKEN=${process.env.ACTIONS_RUNTIME_TOKEN}${os.EOL}`, {
|
fs.appendFileSync(filePath, `ACTIONS_CACHE_SERVICE_V2=true${os.EOL}`, {
|
||||||
encoding: 'utf8'
|
encoding: 'utf8'
|
||||||
})
|
})
|
||||||
fs.appendFileSync(filePath, `ACTIONS_CACHE_URL=${process.env.ACTIONS_CACHE_URL}${os.EOL}`, {
|
fs.appendFileSync(filePath, `ACTIONS_RESULTS_URL=${process.env.ACTIONS_RESULTS_URL}${os.EOL}`, {
|
||||||
|
encoding: 'utf8'
|
||||||
|
})
|
||||||
|
fs.appendFileSync(filePath, `ACTIONS_RUNTIME_TOKEN=${process.env.ACTIONS_RUNTIME_TOKEN}${os.EOL}`, {
|
||||||
encoding: 'utf8'
|
encoding: 'utf8'
|
||||||
})
|
})
|
||||||
fs.appendFileSync(filePath, `GITHUB_RUN_ID=${process.env.GITHUB_RUN_ID}${os.EOL}`, {
|
fs.appendFileSync(filePath, `GITHUB_RUN_ID=${process.env.GITHUB_RUN_ID}${os.EOL}`, {
|
||||||
|
|||||||
+8
-1
@@ -115,6 +115,10 @@ test('restore with restore keys and no cache found', async () => {
|
|||||||
const paths = ['node_modules']
|
const paths = ['node_modules']
|
||||||
const key = 'node-test'
|
const key = 'node-test'
|
||||||
const restoreKeys = ['node-']
|
const restoreKeys = ['node-']
|
||||||
|
const cacheVersion =
|
||||||
|
'd90f107aaeb22920dba0c637a23c37b5bc497b4dfa3b07fe3f79bf88a273c11b'
|
||||||
|
const getCacheVersionMock = jest.spyOn(cacheUtils, 'getCacheVersion')
|
||||||
|
getCacheVersionMock.mockReturnValue(cacheVersion)
|
||||||
|
|
||||||
jest
|
jest
|
||||||
.spyOn(CacheServiceClientJSON.prototype, 'GetCacheEntryDownloadURL')
|
.spyOn(CacheServiceClientJSON.prototype, 'GetCacheEntryDownloadURL')
|
||||||
@@ -130,7 +134,10 @@ test('restore with restore keys and no cache found', async () => {
|
|||||||
|
|
||||||
expect(cacheKey).toBe(undefined)
|
expect(cacheKey).toBe(undefined)
|
||||||
expect(logDebugMock).toHaveBeenCalledWith(
|
expect(logDebugMock).toHaveBeenCalledWith(
|
||||||
`Cache not found for keys: ${[key, ...restoreKeys].join(', ')}`
|
`Cache not found for version ${cacheVersion} of keys: ${[
|
||||||
|
key,
|
||||||
|
...restoreKeys
|
||||||
|
].join(', ')}`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Vendored
+5
-1
@@ -256,7 +256,11 @@ async function restoreCacheV2(
|
|||||||
const response = await twirpClient.GetCacheEntryDownloadURL(request)
|
const response = await twirpClient.GetCacheEntryDownloadURL(request)
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
core.debug(`Cache not found for keys: ${keys.join(', ')}`)
|
core.debug(
|
||||||
|
`Cache not found for version ${request.version} of keys: ${keys.join(
|
||||||
|
', '
|
||||||
|
)}`
|
||||||
|
)
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user