mirror of
https://github.com/actions/toolkit
synced 2025-05-09 08:33:00 +00:00
parent
713902387e
commit
9d54cd22ea
6 changed files with 22 additions and 47 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue