feat: add reusable CI/CD pipeline templates

Reusable Gitea Actions workflows for lint, test, build, and deploy:
- lint-python, lint-node, lint-rust
- test-python, test-node, test-rust
- build-push (Docker build + push to Gitea registry)
- deploy-k8s (GitOps image tag update in cluster repo)

Plus example caller workflows for python-fullstack, rust-service,
and node-frontend stacks. Branch refs aligned to staging per CON-570 standards.
This commit is contained in:
Platform Engineer
2026-03-31 19:55:17 +03:00
parent 491bb8dbfd
commit a620868998
15 changed files with 783 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
# Example build & deploy workflow for a Node.js frontend
# Place in your repo at: .gitea/workflows/build-deploy.yml
name: Build & Deploy
on:
push:
branches: [main]
concurrency:
group: deploy-${{ gitea.ref }}
cancel-in-progress: true
jobs:
ci:
uses: ./.gitea/workflows/ci.yml
build:
needs: ci
uses: wectrl-net/ci-templates/.gitea/workflows/build-push.yaml@main
with:
image-name: git.wectrl.net/wectrl-net/clok1-landing
secrets:
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
deploy:
needs: build
uses: wectrl-net/ci-templates/.gitea/workflows/deploy-k8s.yaml@main
with:
image-name: git.wectrl.net/wectrl-net/clok1-landing
service-name: clok1-landing
deploy-paths: "saas/clok1/app/deployment.yaml"
secrets:
GIT_USER: ${{ secrets.GIT_USER }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}

View File

@@ -0,0 +1,24 @@
# Example CI workflow for a Node.js/TypeScript frontend service (e.g. clok1-landing)
# Place in your repo at: .gitea/workflows/ci.yml
name: CI
on:
pull_request:
branches: [main, staging]
push:
branches: [main, staging]
concurrency:
group: ci-${{ gitea.ref }}
cancel-in-progress: true
jobs:
lint:
uses: wectrl-net/ci-templates/.gitea/workflows/lint-node.yaml@main
with:
node-version: "22"
test:
uses: wectrl-net/ci-templates/.gitea/workflows/test-node.yaml@main
with:
node-version: "22"

View File

@@ -0,0 +1,35 @@
# Example build & deploy workflow for a Python fullstack service
# Place in your repo at: .gitea/workflows/build-deploy.yml
name: Build & Deploy
on:
push:
branches: [main]
concurrency:
group: deploy-${{ gitea.ref }}
cancel-in-progress: true
jobs:
ci:
uses: ./.gitea/workflows/ci.yml
build:
needs: ci
uses: wectrl-net/ci-templates/.gitea/workflows/build-push.yaml@main
with:
image-name: git.wectrl.net/wectrl-net/h1per-pms
secrets:
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
deploy:
needs: build
uses: wectrl-net/ci-templates/.gitea/workflows/deploy-k8s.yaml@main
with:
image-name: git.wectrl.net/wectrl-net/h1per-pms
service-name: h1per-pms
deploy-paths: "saas/h1per/backend/deployment.yaml"
secrets:
GIT_USER: ${{ secrets.GIT_USER }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}

View File

@@ -0,0 +1,34 @@
# Example CI workflow for a Python backend + Node.js frontend service (e.g. h1per-pms)
# Place in your repo at: .gitea/workflows/ci.yml
name: CI
on:
pull_request:
branches: [main, staging]
push:
branches: [main, staging]
concurrency:
group: ci-${{ gitea.ref }}
cancel-in-progress: true
jobs:
lint-backend:
uses: wectrl-net/ci-templates/.gitea/workflows/lint-python.yaml@main
with:
python-version: "3.13"
lint-frontend:
uses: wectrl-net/ci-templates/.gitea/workflows/lint-node.yaml@main
with:
working-directory: web
test-backend:
uses: wectrl-net/ci-templates/.gitea/workflows/test-python.yaml@main
with:
python-version: "3.13"
test-frontend:
uses: wectrl-net/ci-templates/.gitea/workflows/test-node.yaml@main
with:
working-directory: web

View File

@@ -0,0 +1,35 @@
# Example build & deploy workflow for a Rust service
# Place in your repo at: .gitea/workflows/build-deploy.yml
name: Build & Deploy
on:
push:
branches: [main]
concurrency:
group: deploy-${{ gitea.ref }}
cancel-in-progress: true
jobs:
ci:
uses: ./.gitea/workflows/ci.yml
build:
needs: ci
uses: wectrl-net/ci-templates/.gitea/workflows/build-push.yaml@main
with:
image-name: git.wectrl.net/wectrl-net/wectrl-telemetry
secrets:
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
deploy:
needs: build
uses: wectrl-net/ci-templates/.gitea/workflows/deploy-k8s.yaml@main
with:
image-name: git.wectrl.net/wectrl-net/wectrl-telemetry
service-name: wectrl-telemetry
deploy-paths: "platform/components/wectrl-telemetry/deployment.yaml"
secrets:
GIT_USER: ${{ secrets.GIT_USER }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}

View File

@@ -0,0 +1,24 @@
# Example CI workflow for a Rust service (e.g. wectrl-telemetry)
# Place in your repo at: .gitea/workflows/ci.yml
name: CI
on:
pull_request:
branches: [main, staging]
push:
branches: [main, staging]
concurrency:
group: ci-${{ gitea.ref }}
cancel-in-progress: true
jobs:
lint:
uses: wectrl-net/ci-templates/.gitea/workflows/lint-rust.yaml@main
with:
rust-toolchain: stable
test:
uses: wectrl-net/ci-templates/.gitea/workflows/test-rust.yaml@main
with:
rust-toolchain: stable