Table of Contents

Gitea Actions Overview

Gitea Actions is a CI/CD system built into Gitea that uses the same workflow file syntax as GitHub Actions. Workflows are defined in .gitea/workflows/ and run on registered act_runner instances.

What this page covers

  • Workflow file structure and location
  • Trigger events: push, pull request, manual dispatch
  • Job and step definitions
  • Using secrets and environment variables
  • Caching dependencies between runs
  • Matrix builds for multiple targets

Workflow file structure

# .gitea/workflows/ci.yml
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: make build
      - name: Test
        run: make test

Using secrets

Store sensitive values (registry credentials, API tokens) in Gitea's secret store (Repository Settings > Actions > Secrets) and reference them in workflows:

- name: Login to registry
  run: docker login ${{ secrets.REGISTRY_URL }} -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }}