mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-10 16:46:56 +00:00
Accept a single secret path
This commit is contained in:
parent
1a8566e499
commit
ffff230862
2 changed files with 5 additions and 5 deletions
|
|
@ -4,9 +4,9 @@ inputs:
|
|||
url:
|
||||
description: 'The URL for the vault endpoint'
|
||||
required: true
|
||||
secrets:
|
||||
description: 'A semicolon-separated list of secrets to retrieve. These will automatically be converted to environmental variable keys. See README for more details'
|
||||
required: false
|
||||
path:
|
||||
description: 'The path to the secret, such as `/mysecrets/data/myapp/build`. Each key will be exported into its own environment variable.'
|
||||
required: true
|
||||
namespace:
|
||||
description: 'The Vault namespace from which to query secrets. Vault Enterprise only, unset by default'
|
||||
required: false
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@ const ENCODING_TYPES = ['base64', 'hex', 'utf8'];
|
|||
|
||||
async function exportSecrets() {
|
||||
const vaultUrl = core.getInput('url', { required: true });
|
||||
const secretsPath = core.getInput('path', { required: true });
|
||||
const vaultNamespace = core.getInput('namespace', { required: false });
|
||||
const extraHeaders = parseHeadersInput('extraHeaders', { required: false });
|
||||
const exportEnv = core.getInput('exportEnv', { required: false }) != 'false';
|
||||
const outputToken = (core.getInput('outputToken', { required: false }) || 'false').toLowerCase() != 'false';
|
||||
const exportToken = (core.getInput('exportToken', { required: false }) || 'false').toLowerCase() != 'false';
|
||||
|
||||
const secretsInput = core.getInput('secrets', { required: false });
|
||||
const secretRequests = parseSecretsInput(secretsInput);
|
||||
const secretRequests = parseSecretsInput(secretsPath);
|
||||
|
||||
const secretEncodingType = core.getInput('secretEncodingType', { required: false });
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue