Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73d8e12de2 | ||
|
|
31a98126a0 | ||
|
|
7e7e8d4206 | ||
|
|
b463992869 | ||
|
|
39b9640642 | ||
|
|
f0a876ab8b | ||
|
|
58406447b5 | ||
|
|
087191dabd | ||
|
|
862c4e9db4 | ||
|
|
d1abf7dc74 | ||
|
|
475192a0c3 | ||
|
|
c07c5fc410 | ||
|
|
b820a0ff59 | ||
|
|
72dfadb0c3 |
Generated
+88
-20036
File diff suppressed because it is too large
Load Diff
Vendored
+9
@@ -47,3 +47,12 @@
|
|||||||
### 1.0.9
|
### 1.0.9
|
||||||
- Use @azure/ms-rest-js v2.6.0
|
- Use @azure/ms-rest-js v2.6.0
|
||||||
- Use @azure/storage-blob v12.8.0
|
- Use @azure/storage-blob v12.8.0
|
||||||
|
|
||||||
|
### 1.0.10
|
||||||
|
- Update `lockfileVersion` to `v2` in `package-lock.json [#1022](https://github.com/actions/toolkit/pull/1022)
|
||||||
|
|
||||||
|
### 1.0.11
|
||||||
|
- Fix file downloads > 2GB([issue](https://github.com/actions/cache/issues/773))
|
||||||
|
|
||||||
|
### 2.0.0
|
||||||
|
- Added support to check if Actions cache service feature is available or not [#1028](https://github.com/actions/toolkit/pull/1028)
|
||||||
|
|||||||
+2
-2
@@ -3,10 +3,10 @@
|
|||||||
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_URL=${process.env.ACTIONS_RUNTIME_URL}${os.EOL}`, {
|
fs.appendFileSync(filePath, `ACTIONS_RUNTIME_TOKEN=${process.env.ACTIONS_RUNTIME_TOKEN}${os.EOL}`, {
|
||||||
encoding: 'utf8'
|
encoding: 'utf8'
|
||||||
})
|
})
|
||||||
fs.appendFileSync(filePath, `ACTIONS_RUNTIME_TOKEN=${process.env.ACTIONS_RUNTIME_TOKEN}${os.EOL}`, {
|
fs.appendFileSync(filePath, `ACTIONS_CACHE_URL=${process.env.ACTIONS_CACHE_URL}${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}`, {
|
||||||
|
|||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
import * as cache from '../src/cache'
|
||||||
|
|
||||||
|
test('isFeatureAvailable returns true if server url is set', () => {
|
||||||
|
try {
|
||||||
|
process.env['ACTIONS_CACHE_URL'] = 'http://cache.com'
|
||||||
|
expect(cache.isFeatureAvailable()).toBe(true)
|
||||||
|
} finally {
|
||||||
|
delete process.env['ACTIONS_CACHE_URL']
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
test('isFeatureAvailable returns false if server url is not set', () => {
|
||||||
|
expect(cache.isFeatureAvailable()).toBe(false)
|
||||||
|
})
|
||||||
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/cache",
|
"name": "@actions/cache",
|
||||||
"version": "1.0.9",
|
"version": "2.0.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/cache",
|
"name": "@actions/cache",
|
||||||
"version": "1.0.9",
|
"version": "2.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/cache",
|
"name": "@actions/cache",
|
||||||
"version": "1.0.9",
|
"version": "2.0.0",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"description": "Actions cache lib",
|
"description": "Actions cache lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
Vendored
+10
@@ -43,6 +43,16 @@ function checkKey(key: string): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* isFeatureAvailable to check the presence of Actions cache service
|
||||||
|
*
|
||||||
|
* @returns boolean return true if Actions cache service feature is available, otherwise false
|
||||||
|
*/
|
||||||
|
|
||||||
|
export function isFeatureAvailable(): boolean {
|
||||||
|
return !!process.env['ACTIONS_CACHE_URL']
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restores cache from keys
|
* Restores cache from keys
|
||||||
*
|
*
|
||||||
|
|||||||
+1
-6
@@ -31,12 +31,7 @@ import {
|
|||||||
const versionSalt = '1.0'
|
const versionSalt = '1.0'
|
||||||
|
|
||||||
function getCacheApiUrl(resource: string): string {
|
function getCacheApiUrl(resource: string): string {
|
||||||
// Ideally we just use ACTIONS_CACHE_URL
|
const baseUrl: string = process.env['ACTIONS_CACHE_URL'] || ''
|
||||||
const baseUrl: string = (
|
|
||||||
process.env['ACTIONS_CACHE_URL'] ||
|
|
||||||
process.env['ACTIONS_RUNTIME_URL'] ||
|
|
||||||
''
|
|
||||||
).replace('pipelines', 'artifactcache')
|
|
||||||
if (!baseUrl) {
|
if (!baseUrl) {
|
||||||
throw new Error('Cache Service Url not found, unable to restore cache.')
|
throw new Error('Cache Service Url not found, unable to restore cache.')
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -240,7 +240,8 @@ export async function downloadCacheStorageSDK(
|
|||||||
//
|
//
|
||||||
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
|
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
|
||||||
// on 64-bit systems), split the download into multiple segments
|
// on 64-bit systems), split the download into multiple segments
|
||||||
const maxSegmentSize = buffer.constants.MAX_LENGTH
|
// ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
|
||||||
|
const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH)
|
||||||
const downloadProgress = new DownloadProgress(contentLength)
|
const downloadProgress = new DownloadProgress(contentLength)
|
||||||
|
|
||||||
const fd = fs.openSync(archivePath, 'w')
|
const fd = fs.openSync(archivePath, 'w')
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# @actions/exec Releases
|
# @actions/exec Releases
|
||||||
|
|
||||||
|
### 1.1.1
|
||||||
|
- Update `lockfileVersion` to `v2` in `package-lock.json [#1024](https://github.com/actions/toolkit/pull/1024)
|
||||||
|
|
||||||
### 1.1.0
|
### 1.1.0
|
||||||
|
|
||||||
- [Fix stdline dropping large output](https://github.com/actions/toolkit/pull/773)
|
- [Fix stdline dropping large output](https://github.com/actions/toolkit/pull/773)
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/exec",
|
"name": "@actions/exec",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/exec",
|
"name": "@actions/exec",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/io": "^1.0.1"
|
"@actions/io": "^1.0.1"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/exec",
|
"name": "@actions/exec",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "Actions exec lib",
|
"description": "Actions exec lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# @actions/github Releases
|
# @actions/github Releases
|
||||||
|
|
||||||
|
### 5.0.1
|
||||||
|
- [Update Octokit Dependencies](https://github.com/actions/toolkit/pull/1037)
|
||||||
### 5.0.0
|
### 5.0.0
|
||||||
- [Update @actions/github to include latest octokit definitions](https://github.com/actions/toolkit/pull/783)
|
- [Update @actions/github to include latest octokit definitions](https://github.com/actions/toolkit/pull/783)
|
||||||
- [Add urls to context](https://github.com/actions/toolkit/pull/794)
|
- [Add urls to context](https://github.com/actions/toolkit/pull/794)
|
||||||
|
|||||||
Generated
+117
-6959
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/github",
|
"name": "@actions/github",
|
||||||
"version": "5.0.0",
|
"version": "5.0.1",
|
||||||
"description": "Actions github lib",
|
"description": "Actions github lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
@@ -39,9 +39,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": "^1.0.11",
|
"@actions/http-client": "^1.0.11",
|
||||||
"@octokit/core": "^3.4.0",
|
"@octokit/core": "^3.6.0",
|
||||||
"@octokit/plugin-paginate-rest": "^2.13.3",
|
"@octokit/plugin-paginate-rest": "^2.17.0",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^5.1.1"
|
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"proxy": "^1.0.2"
|
"proxy": "^1.0.2"
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# @actions/glob Releases
|
# @actions/glob Releases
|
||||||
|
|
||||||
|
### 0.2.1
|
||||||
|
- Update `lockfileVersion` to `v2` in `package-lock.json [#1023](https://github.com/actions/toolkit/pull/1023)
|
||||||
|
|
||||||
### 0.2.0
|
### 0.2.0
|
||||||
- [Added the hashFiles function to Glob](https://github.com/actions/toolkit/pull/830)
|
- [Added the hashFiles function to Glob](https://github.com/actions/toolkit/pull/830)
|
||||||
- [Added an option to filter out directories](https://github.com/actions/toolkit/pull/728)
|
- [Added an option to filter out directories](https://github.com/actions/toolkit/pull/728)
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/glob",
|
"name": "@actions/glob",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/glob",
|
"name": "@actions/glob",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/glob",
|
"name": "@actions/glob",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"description": "Actions glob lib",
|
"description": "Actions glob lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# @actions/io Releases
|
# @actions/io Releases
|
||||||
|
|
||||||
|
### 1.1.2
|
||||||
|
- Update `lockfileVersion` to `v2` in `package-lock.json [#1020](https://github.com/actions/toolkit/pull/1020)
|
||||||
|
|
||||||
### 1.1.1
|
### 1.1.1
|
||||||
- [Fixed a bug where we incorrectly escaped paths for rmrf](https://github.com/actions/toolkit/pull/828)
|
- [Fixed a bug where we incorrectly escaped paths for rmrf](https://github.com/actions/toolkit/pull/828)
|
||||||
|
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/io",
|
"name": "@actions/io",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/io",
|
"name": "@actions/io",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/io",
|
"name": "@actions/io",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"description": "Actions io lib",
|
"description": "Actions io lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# @actions/tool-cache Releases
|
# @actions/tool-cache Releases
|
||||||
|
|
||||||
|
### 1.7.2
|
||||||
|
- Update `lockfileVersion` to `v2` in `package-lock.json [#1025](https://github.com/actions/toolkit/pull/1025)
|
||||||
|
|
||||||
### 1.7.1
|
### 1.7.1
|
||||||
- [Fallback to os-releases file to get linux version](https://github.com/actions/toolkit/pull/594)
|
- [Fallback to os-releases file to get linux version](https://github.com/actions/toolkit/pull/594)
|
||||||
- [Update to latest @actions/io verison](https://github.com/actions/toolkit/pull/838)
|
- [Update to latest @actions/io verison](https://github.com/actions/toolkit/pull/838)
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/tool-cache",
|
"name": "@actions/tool-cache",
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/tool-cache",
|
"name": "@actions/tool-cache",
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/tool-cache",
|
"name": "@actions/tool-cache",
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"description": "Actions tool-cache lib",
|
"description": "Actions tool-cache lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
|
|||||||
Reference in New Issue
Block a user