mirror of https://github.com/actions/toolkit
Merge branch 'master' into features/core
commit
3bb3f36a03
|
@ -23,7 +23,7 @@ action "Compile" {
|
||||||
action "Format" {
|
action "Format" {
|
||||||
needs = "Dependencies"
|
needs = "Dependencies"
|
||||||
uses = "actions/npm@v2.0.0"
|
uses = "actions/npm@v2.0.0"
|
||||||
args = "run format"
|
args = "run format-check"
|
||||||
}
|
}
|
||||||
|
|
||||||
action "Test" {
|
action "Test" {
|
||||||
|
|
|
@ -12,6 +12,14 @@ export function debug(message: string): void
|
||||||
export function warning(message: string): void
|
export function warning(message: string): void
|
||||||
export function error(message: string): void
|
export function error(message: string): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface for exportVariable options
|
||||||
|
*/
|
||||||
|
export interface ExportOptions {
|
||||||
|
/** Optional. Whether the variable should be marked as secret (will be masked from logs). Defaults to false */
|
||||||
|
isSecret?: bool;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets env variable for this action and future actions in the job
|
* sets env variable for this action and future actions in the job
|
||||||
*
|
*
|
||||||
|
@ -19,17 +27,7 @@ export function error(message: string): void
|
||||||
* @param val the value of the variable
|
* @param val the value of the variable
|
||||||
* @param options optional. See ExportOptions.
|
* @param options optional. See ExportOptions.
|
||||||
*/
|
*/
|
||||||
export function exportVariable(name: string, val: string): void
|
export function exportVariable(name: string, val: string, options?: ExportOptions): 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
|
|
||||||
*/
|
|
||||||
export function exportSecret(name: string, val: string) {
|
|
||||||
exportVariable(name, val);
|
|
||||||
intm._issueCommand('set-secret', {}, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for getInput options
|
* Interface for getInput options
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "lerna bootstrap",
|
"bootstrap": "lerna bootstrap",
|
||||||
"build": "lerna run tsc",
|
"build": "lerna run tsc",
|
||||||
"format": "prettier --check packages/**/*.ts",
|
"format": "prettier --write packages/**/*.ts",
|
||||||
|
"format-check": "prettier --check packages/**/*.ts",
|
||||||
"new-package": "scripts/create-package",
|
"new-package": "scripts/create-package",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue