Template
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.
This commit is contained in:
@@ -35,7 +35,14 @@ jobs:
|
|||||||
name: Build & Import
|
name: Build & Import
|
||||||
needs: check
|
needs: check
|
||||||
runs-on: self-hosted
|
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:
|
outputs:
|
||||||
image-tag: ${{ steps.meta.outputs.sha-tag }}
|
image-tag: ${{ steps.meta.outputs.sha-tag }}
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user