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:
|
url:
|
||||||
description: 'The URL for the vault endpoint'
|
description: 'The URL for the vault endpoint'
|
||||||
required: true
|
required: true
|
||||||
secrets:
|
path:
|
||||||
description: 'A semicolon-separated list of secrets to retrieve. These will automatically be converted to environmental variable keys. See README for more details'
|
description: 'The path to the secret, such as `/mysecrets/data/myapp/build`. Each key will be exported into its own environment variable.'
|
||||||
required: false
|
required: true
|
||||||
namespace:
|
namespace:
|
||||||
description: 'The Vault namespace from which to query secrets. Vault Enterprise only, unset by default'
|
description: 'The Vault namespace from which to query secrets. Vault Enterprise only, unset by default'
|
||||||
required: false
|
required: false
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,14 @@ const ENCODING_TYPES = ['base64', 'hex', 'utf8'];
|
||||||
|
|
||||||
async function exportSecrets() {
|
async function exportSecrets() {
|
||||||
const vaultUrl = core.getInput('url', { required: true });
|
const vaultUrl = core.getInput('url', { required: true });
|
||||||
|
const secretsPath = core.getInput('path', { required: true });
|
||||||
const vaultNamespace = core.getInput('namespace', { required: false });
|
const vaultNamespace = core.getInput('namespace', { required: false });
|
||||||
const extraHeaders = parseHeadersInput('extraHeaders', { required: false });
|
const extraHeaders = parseHeadersInput('extraHeaders', { required: false });
|
||||||
const exportEnv = core.getInput('exportEnv', { required: false }) != 'false';
|
const exportEnv = core.getInput('exportEnv', { required: false }) != 'false';
|
||||||
const outputToken = (core.getInput('outputToken', { required: false }) || 'false').toLowerCase() != 'false';
|
const outputToken = (core.getInput('outputToken', { required: false }) || 'false').toLowerCase() != 'false';
|
||||||
const exportToken = (core.getInput('exportToken', { 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(secretsPath);
|
||||||
const secretRequests = parseSecretsInput(secretsInput);
|
|
||||||
|
|
||||||
const secretEncodingType = core.getInput('secretEncodingType', { required: false });
|
const secretEncodingType = core.getInput('secretEncodingType', { required: false });
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue