From ab4dc55b2ecc6eb5926c5caffa45eaf0c3ad735a Mon Sep 17 00:00:00 2001 From: Richard Simpson Date: Thu, 9 Jan 2020 10:31:15 -0600 Subject: [PATCH] fix: actually build namespace changes --- dist/index.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 647a6b0c..9ad7e228 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3749,17 +3749,23 @@ const got = __webpack_require__(798); async function exportSecrets() { const vaultUrl = core.getInput('url', { required: true }); const vaultToken = core.getInput('token', { required: true }); + const vaultNamespace = core.getInput('namespace', { required: false }); const secretsInput = core.getInput('secrets', { required: true }); const secrets = parseSecretsInput(secretsInput); for (const secret of secrets) { const { secretPath, outputName, secretKey } = secret; - const result = await got(`${vaultUrl}/v1/secret/data/${secretPath}`, { + const requestOptions = { headers: { 'X-Vault-Token': vaultToken - } - }); + }}; + + if (vaultNamespace != null){ + requestOptions.headers["X-Vault-Namespace"] = vaultNamespace + } + + const result = await got(`${vaultUrl}/v1/secret/data/${secretPath}`, requestOptions); const parsedResponse = JSON.parse(result.body); const vaultKeyData = parsedResponse.data; @@ -3837,6 +3843,7 @@ module.exports = { normalizeOutputKey }; + /***/ }), /***/ 761: