CI/CD Pipeline
All applications follow a single, consistent Gitea Actions pipeline.
Flowโ
Workflow Templateโ
# .gitea/workflows/build.yml
name: Build and Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: make build # or go build / pnpm build
- name: Test
run: make test
- name: Docker build & push
if: github.ref == 'refs/heads/main'
run: |
docker build -t $ZOT_REGISTRY/$APP_NAME:$GITHUB_SHA .
docker push $ZOT_REGISTRY/$APP_NAME:$GITHUB_SHA
- name: Deploy
if: github.ref == 'refs/heads/main'
run: |
ssh deploy@lego-cloud.eu "docker pull && docker restart $APP_NAME"
Gitea Actions Runnersโ
Runners need to be registered on the Gitea instance. See Gitea Actions documentation for setup.