generated from mathias/template-go-web
fix(ci): correct CD guard so real jobs run (F8)
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:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user