mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-04 12:23:16 +08:00
Add support for multi-line secrets in setSecret
This commit is contained in:
@@ -97,7 +97,11 @@ export function exportVariable(name: string, val: any): void {
|
||||
* @param secret value of the secret
|
||||
*/
|
||||
export function setSecret(secret: string): void {
|
||||
issueCommand('add-mask', {}, secret)
|
||||
secret.split(/\r?\n|\r/).forEach(part => {
|
||||
if (part) {
|
||||
issueCommand('add-mask', {}, part)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user