@actions/core
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -22,3 +22,3 @@ /** | ||
/** | ||
* sets env variable for this action and future actions in the job | ||
* Sets env variable for this action and future actions in the job | ||
* @param name the name of the variable to set | ||
@@ -29,7 +29,6 @@ * @param val the value of the variable | ||
/** | ||
* exports the variable and registers a secret which will get masked from logs | ||
* @param name the name of the variable to set | ||
* @param val value of the secret | ||
* Registers a secret which will get masked from logs | ||
* @param secret value of the secret | ||
*/ | ||
export declare function exportSecret(name: string, val: string): void; | ||
export declare function setSecret(secret: string): void; | ||
/** | ||
@@ -36,0 +35,0 @@ * Prepends inputPath to the PATH (for this action and future actions) |
@@ -33,3 +33,3 @@ "use strict"; | ||
/** | ||
* sets env variable for this action and future actions in the job | ||
* Sets env variable for this action and future actions in the job | ||
* @param name the name of the variable to set | ||
@@ -44,13 +44,9 @@ * @param val the value of the variable | ||
/** | ||
* exports the variable and registers a secret which will get masked from logs | ||
* @param name the name of the variable to set | ||
* @param val value of the secret | ||
* Registers a secret which will get masked from logs | ||
* @param secret value of the secret | ||
*/ | ||
function exportSecret(name, val) { | ||
exportVariable(name, val); | ||
// the runner will error with not implemented | ||
// leaving the function but raising the error earlier | ||
command_1.issueCommand('set-secret', {}, val); | ||
function setSecret(secret) { | ||
command_1.issueCommand('add-mask', {}, secret); | ||
} | ||
exports.exportSecret = exportSecret; | ||
exports.setSecret = setSecret; | ||
/** | ||
@@ -57,0 +53,0 @@ * Prepends inputPath to the PATH (for this action and future actions) |
{ | ||
"name": "@actions/core", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Actions core lib", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -35,6 +35,8 @@ # `@actions/core` | ||
Exporting a secret exports the variable but also registers the secret with the runner to ensure it is masked in logs. | ||
#### Setting a secret | ||
Setting a secret registers the secret with the runner to ensure it is masked in logs. | ||
```js | ||
core.exportSecret('myPassword', mypass); | ||
core.setSecret('myPassword'); | ||
``` | ||
@@ -41,0 +43,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
107
0
18043
350