gowalk-cicd 1.0.187 → 1.0.188
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/CONFIGURATION.md
CHANGED
|
@@ -76,6 +76,9 @@ are retained as sparse `workflows.<file>.overrides` entries. An override identif
|
|
|
76
76
|
a YAML path, with `value` or `remove: true`; step paths use stable IDs/names rather
|
|
77
77
|
than numeric positions. These extensions are app-owned configuration, including
|
|
78
78
|
their execution conditions, dependencies and secret references.
|
|
79
|
+
Reusable workflow jobs may retain GitHub's `secrets: inherit` handoff. This literal is accepted
|
|
80
|
+
only at `jobs.<job>.secrets`; named secret mappings and other credential inputs still require
|
|
81
|
+
GitHub secret references. Sparse overrides are checked at their rendered workflow paths.
|
|
79
82
|
|
|
80
83
|
Candidate artifacts are enabled automatically for recognized execution. Custom deployment
|
|
81
84
|
commands that the installer cannot establish as candidate-safe retain the normal main
|
package/package.json
CHANGED
package/src/config/settings.mjs
CHANGED
|
@@ -59,8 +59,11 @@ export function assertReferences(value, file, path = []) {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
if (typeof value !== 'string' || !value.trim()) return;
|
|
62
|
+
// GitHub's reusable-workflow handoff is syntax, not an inline credential.
|
|
63
|
+
if (value === 'inherit' && path.length === 3 && path[0] === 'jobs' && path[2] === 'secrets') return;
|
|
64
|
+
const secretValue = path[0] === 'jobs' && path[2] === 'secrets';
|
|
62
65
|
const key = path.at(-1) || '';
|
|
63
|
-
if (key === 'runtime-env' && value.includes('\n')) {
|
|
66
|
+
if (key === 'runtime-env' && value.includes('\n') && !secretValue) {
|
|
64
67
|
for (const line of value.split('\n').filter(line => line.trim() && !line.trim().startsWith('#'))) {
|
|
65
68
|
const match = /^([A-Z_][A-Z0-9_]*)=(.*)$/.exec(line);
|
|
66
69
|
if (!match) throw new MigrationRepair('unsupported_runtime_environment', file, path);
|
|
@@ -68,7 +71,7 @@ export function assertReferences(value, file, path = []) {
|
|
|
68
71
|
}
|
|
69
72
|
return;
|
|
70
73
|
}
|
|
71
|
-
const credentialKey = /(?:password|private.key|ssh-key|runtime-env|token|secret|credential)/i.test(key);
|
|
74
|
+
const credentialKey = secretValue || /(?:password|private.key|ssh-key|runtime-env|token|secret|credential)/i.test(key);
|
|
72
75
|
const referencesOnly = /^\s*\$\{\{[^}]+\}\}\s*$/.test(value);
|
|
73
76
|
if ((credentialKey && !referencesOnly) || /-----BEGIN [A-Z ]*PRIVATE KEY-----/.test(value)
|
|
74
77
|
|| /https?:\/\/[^\s/@]+:[^\s/@]+@/.test(value)) {
|
package/src/config/workflows.mjs
CHANGED
|
@@ -108,8 +108,9 @@ export function planWorkflows(root, templateDir, files, version) {
|
|
|
108
108
|
delete state.lock.workflows[file];
|
|
109
109
|
}
|
|
110
110
|
writes.push(...removed.map(file => ({ file: `.github/workflows/${file}`, content: null })));
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
const { workflows, ...settings } = state.config;
|
|
112
|
+
assertReferences(settings, CONFIG);
|
|
113
|
+
for (const [file, entry] of Object.entries(workflows)) {
|
|
113
114
|
for (const change of entry.overrides) assertReferences(change.value, file, change.path);
|
|
114
115
|
}
|
|
115
116
|
writes.push(...planValidation(root, [...selected, WARM, RECOVERY]));
|