mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-04-16 16:55:45 +00:00
feat(): make secrets parameter optional
This commit is contained in:
parent
67281159df
commit
fd3c78f918
4 changed files with 6397 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ async function exportSecrets() {
|
|||
const exportEnv = core.getInput('exportEnv', { required: false }) != 'false';
|
||||
const exportToken = (core.getInput('exportToken', { required: false }) || 'false').toLowerCase() != 'false';
|
||||
|
||||
const secretsInput = core.getInput('secrets', { required: true });
|
||||
const secretsInput = core.getInput('secrets', { required: false });
|
||||
const secretRequests = parseSecretsInput(secretsInput);
|
||||
|
||||
const vaultMethod = (core.getInput('method', { required: false }) || 'token').toLowerCase();
|
||||
|
|
@ -103,6 +103,10 @@ async function exportSecrets() {
|
|||
* @param {string} secretsInput
|
||||
*/
|
||||
function parseSecretsInput(secretsInput) {
|
||||
if (!secretsInput) {
|
||||
return []
|
||||
}
|
||||
|
||||
const secrets = secretsInput
|
||||
.split(';')
|
||||
.filter(key => !!key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue