setSecret (#174)

* setSecret
This commit is contained in:
Bryan MacFarlane
2019-10-01 17:13:05 -04:00
committed by GitHub
parent 713902387e
commit 9d54cd22ea
6 changed files with 22 additions and 47 deletions

View File

@@ -31,7 +31,7 @@ export enum ExitCode {
//-----------------------------------------------------------------------
/**
* 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
* @param val the value of the variable
*/
@@ -41,16 +41,11 @@ export function exportVariable(name: string, val: string): void {
}
/**
* 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 function exportSecret(name: string, val: string): void {
exportVariable(name, val)
// the runner will error with not implemented
// leaving the function but raising the error earlier
issueCommand('set-secret', {}, val)
export function setSecret(secret: string): void {
issueCommand('add-mask', {}, secret)
}
/**