forgejo-mcp/.tekton/openspec-validate-push.yaml
Christoph Görn dd94aa6ea9 refactor: ♻️ rename openspec Tekton PipelineRuns
Drop the on-<trigger>-openspec prefix; switch to
openspec-validate-<trigger> so file + metadata.name describe the
capability first, the trigger second. Avoids collision with the
existing openspec-validate Task name (different kinds, but better
to keep them obviously distinct).

- on-pull-request-openspec.yaml -> openspec-validate-pr.yaml
- on-push-to-main-openspec.yaml -> openspec-validate-push.yaml

CEL path-filter references inside each file updated to match the
new filenames.
2026-05-12 09:50:49 +02:00

60 lines
1.7 KiB
YAML

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: openspec-validate-push
annotations:
pipelinesascode.tekton.dev/on-event: "[push]"
pipelinesascode.tekton.dev/on-target-branch: "[main]"
pipelinesascode.tekton.dev/on-cel-expression: |
event == "push" && target_branch == "main" && (
files.all.exists(f, f.startsWith('openspec/')) ||
files.all.exists(f, f == '.tekton/openspec-validate-pr.yaml') ||
files.all.exists(f, f == '.tekton/openspec-validate-push.yaml') ||
files.all.exists(f, f == '.tekton/tasks/openspec-validate.yaml')
)
pipelinesascode.tekton.dev/task: "[git-clone, .tekton/tasks/openspec-validate.yaml]"
pipelinesascode.tekton.dev/max-keep-runs: "5"
pipelinesascode.tekton.dev/cancel-in-progress: "true"
spec:
params:
- name: repo_url
value: "{{ repo_url }}"
- name: revision
value: "{{ revision }}"
pipelineSpec:
params:
- name: repo_url
- name: revision
workspaces:
- name: source
tasks:
- name: fetch-source
taskRef:
name: git-clone
workspaces:
- name: output
workspace: source
params:
- name: url
value: $(params.repo_url)
- name: revision
value: $(params.revision)
- name: validate
taskRef:
name: openspec-validate
runAfter:
- fetch-source
workspaces:
- name: source
workspace: source
workspaces:
- name: source
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi