mirror of
https://github.com/tailscale/github-action.git
synced 2026-08-21 03:59:23 +00:00
mask secrets
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
This commit is contained in:
parent
ac425ca194
commit
0edb496506
2 changed files with 28 additions and 4 deletions
15
dist/index.js
vendored
15
dist/index.js
vendored
|
|
@ -41254,13 +41254,24 @@ async function pingHost(host) {
|
|||
async function getInputs() {
|
||||
let ping = core.getInput("ping");
|
||||
let pingHosts = ping?.length > 0 ? ping.split(",") : [];
|
||||
const authKey = core.getInput("authkey") || "";
|
||||
const oauthSecret = core.getInput("oauth-secret") || "";
|
||||
// Mask sensitive values in logs unless debug mode is enabled
|
||||
if (!core.isDebug()) {
|
||||
if (authKey) {
|
||||
core.setSecret(authKey);
|
||||
}
|
||||
if (oauthSecret) {
|
||||
core.setSecret(oauthSecret);
|
||||
}
|
||||
}
|
||||
return {
|
||||
version: core.getInput("version") || "1.88.3",
|
||||
resolvedVersion: "",
|
||||
arch: "",
|
||||
authKey: core.getInput("authkey") || "",
|
||||
authKey: authKey,
|
||||
oauthClientId: core.getInput("oauth-client-id") || "",
|
||||
oauthSecret: core.getInput("oauth-secret") || "",
|
||||
oauthSecret: oauthSecret,
|
||||
tags: core.getInput("tags") || "",
|
||||
hostname: core.getInput("hostname") || "",
|
||||
args: core.getInput("args") || "",
|
||||
|
|
|
|||
17
src/main.ts
17
src/main.ts
|
|
@ -203,13 +203,26 @@ async function getInputs(): Promise<TailscaleConfig> {
|
|||
let ping = core.getInput("ping");
|
||||
let pingHosts = ping?.length > 0 ? ping.split(",") : [];
|
||||
|
||||
const authKey = core.getInput("authkey") || "";
|
||||
const oauthSecret = core.getInput("oauth-secret") || "";
|
||||
|
||||
// Mask sensitive values in logs unless debug mode is enabled
|
||||
if (!core.isDebug()) {
|
||||
if (authKey) {
|
||||
core.setSecret(authKey);
|
||||
}
|
||||
if (oauthSecret) {
|
||||
core.setSecret(oauthSecret);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
version: core.getInput("version") || "1.88.3",
|
||||
resolvedVersion: "",
|
||||
arch: "",
|
||||
authKey: core.getInput("authkey") || "",
|
||||
authKey: authKey,
|
||||
oauthClientId: core.getInput("oauth-client-id") || "",
|
||||
oauthSecret: core.getInput("oauth-secret") || "",
|
||||
oauthSecret: oauthSecret,
|
||||
tags: core.getInput("tags") || "",
|
||||
hostname: core.getInput("hostname") || "",
|
||||
args: core.getInput("args") || "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue