Skip to content

Commit

Permalink
WIP: put add-mask in helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaso committed Mar 31, 2024
1 parent 64989b5 commit 2325177
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vault_oidc_ssh_cert_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ class VoscaError(Exception):
pass


def _mask_value(secret: str) -> None:
print(f"::add-mask::{secret}")


def _set_error_message(title: str, message: str) -> None:
print(f"::error title={title}::{message}")

Expand Down Expand Up @@ -105,7 +109,7 @@ def github_vault_auth() -> None:
vault_server, oidc_backend, oidc_role, jwt_token
)

print(f"::add-mask::{vault_token}")
_mask_value(vault_token)
with open(os.environ["GITHUB_OUTPUT"], mode="a", encoding="utf-8") as ghof:
ghof.write(f"vault_token={vault_token}\n")

Expand Down

0 comments on commit 2325177

Please sign in to comment.