What are Gitea Actions?
Gitea Actions is MokoGIT's built-in CI/CD system. It uses a workflow syntax compatible with GitHub Actions, so if you've used GitHub Actions before, you'll feel right at home. Moko Consulting manages the runner infrastructure, so you can focus on writing your pipelines.
Creating Your First Workflow
- In your repository, create the directory
.mokogit/workflows/. (The legacy.gitea/workflows/and.github/workflows/paths are still recognized for compatibility.) - Add a YAML file (e.g.,
ci.yaml) with your workflow definition. - Commit and push — the workflow will run automatically.
Example: Basic CI Pipeline
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
Workflow Triggers
Control when workflows run using the on key:
- push — Run on commits pushed to specified branches.
- pull_request — Run when PRs are opened, updated, or synchronized.
- schedule — Run on a cron schedule (e.g., nightly builds).
- workflow_dispatch — Manually trigger from the MokoGIT UI.
Secrets and Variables
Store sensitive values (API keys, deployment credentials) as repository secrets:
- Go to Settings → Actions → Secrets.
- Click Add Secret.
- Enter a Name and Value.
Reference secrets in your workflow:
steps:
- name: Deploy
run: ./deploy.sh
env:
API_KEY: ${{ secrets.API_KEY }}
Viewing Workflow Results
Check the Actions tab in your repository to see:
- A list of all workflow runs with status (success, failure, in progress).
- Detailed logs for each step.
- Re-run options for failed workflows.
Common Use Cases
- Automated testing — Run unit tests on every push or PR.
- Build and package — Compile code and create release artifacts.
- Deployment — Deploy to staging or production on merge to your release branch.
- Linting — Check code style and formatting automatically.
The managed release pipeline
On MokoConsulting's own repositories, the shared CI/CD pipeline (distributed automatically by Sync Profiles) does the heavy lifting for you: a single tier-selecting deploy.yml builds and deploys to the right environment based on the branch, a universal auto-release.yml cuts stable releases, and a pre-release.yml publishes development-channel builds. Promotion follows the dev → rc → stable ladder. For the full picture, see MokoGIT: CI/CD & Release Pipeline and MokoGIT: Branch Model & Release Channels.
Runner Infrastructure
Moko Consulting manages the Gitea Actions runners for your MokoGIT instance. If you need custom runners (e.g., for specialized build environments or GPU workloads), contact our support team.