mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-20 01:14:38 +00:00
build dist
This commit is contained in:
parent
cbbdf262e3
commit
d8b702960f
2 changed files with 20 additions and 8 deletions
14
dist/post_run/index.js
vendored
14
dist/post_run/index.js
vendored
|
|
@ -58,6 +58,15 @@ function checkKey(key) {
|
|||
throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* isFeatureAvailable to check the presence of Actions cache service
|
||||
*
|
||||
* @returns boolean return true if Actions cache service feature is available, otherwise false
|
||||
*/
|
||||
function isFeatureAvailable() {
|
||||
return !!process.env['ACTIONS_CACHE_URL'];
|
||||
}
|
||||
exports.isFeatureAvailable = isFeatureAvailable;
|
||||
/**
|
||||
* Restores cache from keys
|
||||
*
|
||||
|
|
@ -208,10 +217,7 @@ const options_1 = __nccwpck_require__(6215);
|
|||
const requestUtils_1 = __nccwpck_require__(3981);
|
||||
const versionSalt = '1.0';
|
||||
function getCacheApiUrl(resource) {
|
||||
// Ideally we just use ACTIONS_CACHE_URL
|
||||
const baseUrl = (process.env['ACTIONS_CACHE_URL'] ||
|
||||
process.env['ACTIONS_RUNTIME_URL'] ||
|
||||
'').replace('pipelines', 'artifactcache');
|
||||
const baseUrl = process.env['ACTIONS_CACHE_URL'] || '';
|
||||
if (!baseUrl) {
|
||||
throw new Error('Cache Service Url not found, unable to restore cache.');
|
||||
}
|
||||
|
|
|
|||
14
dist/run/index.js
vendored
14
dist/run/index.js
vendored
|
|
@ -58,6 +58,15 @@ function checkKey(key) {
|
|||
throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* isFeatureAvailable to check the presence of Actions cache service
|
||||
*
|
||||
* @returns boolean return true if Actions cache service feature is available, otherwise false
|
||||
*/
|
||||
function isFeatureAvailable() {
|
||||
return !!process.env['ACTIONS_CACHE_URL'];
|
||||
}
|
||||
exports.isFeatureAvailable = isFeatureAvailable;
|
||||
/**
|
||||
* Restores cache from keys
|
||||
*
|
||||
|
|
@ -208,10 +217,7 @@ const options_1 = __nccwpck_require__(6215);
|
|||
const requestUtils_1 = __nccwpck_require__(3981);
|
||||
const versionSalt = '1.0';
|
||||
function getCacheApiUrl(resource) {
|
||||
// Ideally we just use ACTIONS_CACHE_URL
|
||||
const baseUrl = (process.env['ACTIONS_CACHE_URL'] ||
|
||||
process.env['ACTIONS_RUNTIME_URL'] ||
|
||||
'').replace('pipelines', 'artifactcache');
|
||||
const baseUrl = process.env['ACTIONS_CACHE_URL'] || '';
|
||||
if (!baseUrl) {
|
||||
throw new Error('Cache Service Url not found, unable to restore cache.');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue