forgejo-mcp/.tekton/on-push-to-main.yaml
Christoph Görn 7d42257627 ci: 🚀 migrate CI from Forgejo Actions to op1st Tekton
Codeberg's Forgejo runners enforce strict per-job time limits that
the Go build keeps hitting. Move CI to op1st-pipelines (Tekton
Pipelines-as-Code on OpenShift), patterned after goern/epaper-service
and feeldata/feeldata.app.

- .tekton/repository.yaml registers the repo with op1st-pipelines,
  reusing the codeberg-runner-openshift-pac + codeberg-org-op1st-pipelines
  secrets.
- .tekton/on-push-to-main.yaml and .tekton/on-pull-request.yaml trigger
  on push to main and PR open/sync against main respectively, each
  running git-clone then the go-ci task.
- .tekton/tasks/go-ci.yaml runs make build then go test ./... on
  docker.io/library/golang:1.25.
- Drop .forgejo/workflows/go.yml; release.yml stays (tag-driven, off
  the hot path).

Refs: forgejo-mcp-43k
2026-05-12 08:39:45 +02:00

53 lines
1.3 KiB
YAML

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: on-push-to-main
annotations:
pipelinesascode.tekton.dev/on-event: "[push]"
pipelinesascode.tekton.dev/on-target-branch: "[main]"
pipelinesascode.tekton.dev/task: "[git-clone, .tekton/tasks/go-ci.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: build-and-test
taskRef:
name: go-ci
runAfter:
- fetch-source
workspaces:
- name: source
workspace: source
workspaces:
- name: source
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi