You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/commands.md
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,18 @@ function setSecret(secret: string): void {}
50
50
51
51
Now, future logs containing BAR will be masked. E.g. running `echo "Hello FOO BAR World"` will now print `Hello FOO **** World`.
52
52
53
-
**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.
53
+
**WARNING** The add-mask and setSecret commands only support single-line
54
+
secrets or multi-line secrets that have been escaped. `@actions/core`
55
+
`setSecret`will escape the string you provide by default. When an escaped
56
+
multi-line string is provided the whole string and each of its lines
57
+
individually will be masked. For example you can mask `first\nsecond\r\nthird`
58
+
using:
59
+
60
+
```sh
61
+
echo "::add-mask::first%0Asecond%0D%0Athird"
62
+
```
63
+
64
+
This will mask `first%0Asecond%0D%0Athird`, `first`, `second` and `third`.
54
65
55
66
**WARNING** Do **not** mask short values if you can avoid it, it could render your output unreadable (and future steps' output as well).
56
67
For example, if you mask the letter `l`, running `echo "Hello FOO BAR World"` will now print `He*********o FOO BAR Wor****d`
0 commit comments