@actions/core#setSecret TypeScript Examples

The following examples show how to use @actions/core#setSecret. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.ts    From invoke-aws-lambda with MIT License 6 votes vote down vote up
setAWSCredentials = () => {
  const accessKeyId = getInput(Credentials.AWS_ACCESS_KEY_ID);
  setSecret(accessKeyId);

  const secretAccessKey = getInput(Credentials.AWS_SECRET_ACCESS_KEY);
  setSecret(secretAccessKey);

  const sessionToken = getInput(Credentials.AWS_SESSION_TOKEN);
  // Make sure we only mask if specified
  if (sessionToken) {
    setSecret(sessionToken);
  }

  AWS.config.credentials = {
    accessKeyId,
    secretAccessKey,
    sessionToken,
  };
}
Example #2
Source File: ci-login.ts    From cli with Apache License 2.0 5 votes vote down vote up
async function outputCliConfig() {
  const config = getConfig();
  setSecret(config.accessToken);
  exportVariable('CLI_CONFIG_PATH', getConfigFilePath());
}