fix(ci): correct CD guard so real jobs run (F8)
CD / Detect unsubstituted template (push) Successful in 0s
CD / Lint / Test / Vet (push) Successful in 7s
CD / Build & Import (push) Successful in 12s
CD / Deploy via GitOps (push) Failing after 0s

The guard grepped for the substituted module path, which always matches a
generated repo's own go.mod → is_template=true → check/build/deploy all
skipped (fake-green CI, nothing ever built/deployed). Detect leftover
__PLACEHOLDER__ tokens instead — verified: substituted repo runs CI, raw
template skips. Template-wide fix: template-go-web#9.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-19 16:01:32 +02:00
co-authored by Claude Opus 4.8
parent 784ece65d0
commit 68adfe7e01
+5 -1
View File
@@ -19,8 +19,12 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- id: detect - id: detect
# Detect an UNSUBSTITUTED template by the leftover __PLACEHOLDER__ tokens.
# Must not grep for the substituted module path — that pattern is itself
# substituted at generate time, so it would match every real child repo's
# own go.mod and skip all CI forever (template-go-web bug, see repo #).
run: | run: |
if grep -q 'git.d-ma.be/mathias/cad-atlas' go.mod; then if grep -qE '__[A-Z_]+__' go.mod; then
echo "is_template=true" >> "$GITHUB_OUTPUT" echo "is_template=true" >> "$GITHUB_OUTPUT"
else else
echo "is_template=false" >> "$GITHUB_OUTPUT" echo "is_template=false" >> "$GITHUB_OUTPUT"