fix(ci): skip build/deploy on the raw template repo itself (template-go-agent#3)
CD / Lint / Test / Vet (push) Successful in 6s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped

env.IMAGE: __PROJECT_NAME__ is only substituted with a real, lowercase
project name when a repo is *generated* from this template. On the
template repo itself it's still the literal placeholder, which
buildah/Docker reject outright ("repository name must be lowercase") --
build (and therefore deploy) can never succeed here no matter what else
changes. Gate both on github.repository != this template's own path so
the template's CI reads green on what it actually validates: the check
job (lint/vet/test), the thing every generated repo inherits.
This commit is contained in:
2026-07-24 15:22:04 +02:00
parent 06d4ac6076
commit 2ba2698ea6
+8 -1
View File
@@ -35,7 +35,14 @@ jobs:
name: Build & Import
needs: check
runs-on: self-hosted
if: github.event_name != 'pull_request'
# __PROJECT_NAME__/__MODULE_PATH__ are placeholders substituted only when
# a repo is generated from this template -- on the raw template repo
# itself they're still literal, and `IMAGE: __PROJECT_NAME__` contains
# uppercase letters, which buildah/Docker rejects outright ("repository
# name must be lowercase"). Build/deploy can never succeed here; skip
# them on this repo so its own CI reads green on what it can actually
# validate (the check job).
if: github.event_name != 'pull_request' && github.repository != 'mathias/template-go-agent'
outputs:
image-tag: ${{ steps.meta.outputs.sha-tag }}
steps: