Commit a85135d
committed
fix(ci): gate rust/elixir reusables via a detect job, not inputs in job-if
rust-ci-reusable.yml and elixir-ci-reusable.yml put
`hashFiles(format('{0}/<manifest>', inputs.working_directory)) != ''`
directly in each job-level `if:`. That startup-failed the reusable on every
push (run with 0 jobs): the `inputs` context does not exist when GitHub
compiles a workflow for a non-workflow_call event, so the expression is
invalid. (It was also latently broken when *called* — `hashFiles` at job
level runs before any checkout, so it reads an empty workspace.)
Replace with the canonical pattern: a small `detect` job checks out first,
resolves `has_cargo`/`has_mix` (and the enable_audit/enable_coverage toggles
for Rust) into step outputs, and every downstream job gates on
`needs.detect.outputs.*` — valid in every event context and actually sees the
files. No existing job names change, so consumer status-check names are
unaffected.
This is an estate-consumed template change (separate commit for independent
review). Validated with PyYAML. No SPDX header or licence content touched.
https://claude.ai/code/session_011xv3VLrqeXkpjXxUojKz821 parent 68d8834 commit a85135d
2 files changed
Lines changed: 72 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
101 | 127 | | |
102 | 128 | | |
103 | 129 | | |
104 | 130 | | |
| 131 | + | |
105 | 132 | | |
106 | | - | |
| 133 | + | |
107 | 134 | | |
108 | 135 | | |
109 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
106 | 139 | | |
107 | 140 | | |
108 | 141 | | |
109 | 142 | | |
110 | | - | |
| 143 | + | |
| 144 | + | |
111 | 145 | | |
112 | 146 | | |
113 | 147 | | |
| |||
147 | 181 | | |
148 | 182 | | |
149 | 183 | | |
150 | | - | |
151 | | - | |
| 184 | + | |
| 185 | + | |
152 | 186 | | |
153 | 187 | | |
154 | 188 | | |
| |||
187 | 221 | | |
188 | 222 | | |
189 | 223 | | |
190 | | - | |
| 224 | + | |
| 225 | + | |
191 | 226 | | |
192 | 227 | | |
193 | 228 | | |
| |||
216 | 251 | | |
217 | 252 | | |
218 | 253 | | |
219 | | - | |
| 254 | + | |
| 255 | + | |
220 | 256 | | |
221 | 257 | | |
222 | 258 | | |
| |||
0 commit comments