Skip to content

Commit

Permalink
fix: actually build namespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RichiCoder1 committed Jan 9, 2020
1 parent e394527 commit ab4dc55
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -3837,6 +3843,7 @@ module.exports = {
normalizeOutputKey
};


/***/ }),

/***/ 761:
Expand Down

0 comments on commit ab4dc55

Please sign in to comment.