commiting instead of stashing
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user