From 2ba2698ea6e8edc10b4aae49b260f38c26ffdb9a Mon Sep 17 00:00:00 2001 From: mathias Date: Fri, 24 Jul 2026 15:22:04 +0200 Subject: [PATCH] fix(ci): skip build/deploy on the raw template repo itself (template-go-agent#3) 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. --- .gitea/workflows/cd.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/cd.yml b/.gitea/workflows/cd.yml index e931261..46b64a7 100644 --- a/.gitea/workflows/cd.yml +++ b/.gitea/workflows/cd.yml @@ -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: