commiting instead of stashing

This commit is contained in:
Felipe Suero
2023-04-26 11:57:08 -04:00
parent 9945ec321b
commit c4d478d459
+17 -12
View File
@@ -56,24 +56,29 @@ export async function getSecrets(
}
}
let isDynamicEnv = true;
let isDynamicEnv = false;
if (workflowContext.job?.environment && isMapping(workflowContext.job.environment)) {
for (const k of workflowContext.job.environment) {
// check if the value starts with ${{
if (isString(k.value) && k.value.value.startsWith("${{")) {
isDynamicEnv = true;
if (workflowContext?.job?.environment) {
if (isMapping(workflowContext.job.environment)) {
for (const x of workflowContext.job.environment) {
if (isString(x.key) && x.key.value === "name") {
if (isString(x.value)) {
environmentName = x.value.value;
} else {
isDynamicEnv = true;
}
break;
}
}
}
}
console.log(`isDynamicEnv: ${isDynamicEnv}`)
if (isDynamicEnv) {
secretsContext.complete = false;
if (mode === Mode.Validation) {
return secretsContext;
}
}
console.log(`environmentName: ${environmentName}`)
// if (isDynamicEnv) {
secretsContext.complete = false;
return secretsContext;
// }
const secrets = await getRemoteSecrets(octokit, cache, repo, environmentName);