mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-01 03:13:15 +08:00
Add support for multi-line secrets in setSecret
This commit is contained in:
@@ -50,7 +50,10 @@ function setSecret(secret: string): void {}
|
||||
|
||||
Now, future logs containing BAR will be masked. E.g. running `echo "Hello FOO BAR World"` will now print `Hello FOO **** World`.
|
||||
|
||||
**WARNING** The add-mask and setSecret commands only support single line secrets. To register a multiline secrets you must register each line individually otherwise it will not be masked.
|
||||
**WARNING** The add-mask command only supports single line secrets. To register
|
||||
a multiline secret you must register each line individually otherwise it will
|
||||
not be masked, if you use `@actions/core >= 1.11.0` `setSecret` will do this
|
||||
for you.
|
||||
|
||||
**WARNING** Do **not** mask short values if you can avoid it, it could render your output unreadable (and future steps' output as well).
|
||||
For example, if you mask the letter `l`, running `echo "Hello FOO BAR World"` will now print `He*********o FOO BAR Wor****d`
|
||||
|
||||
Reference in New Issue
Block a user