Skip to content

CICD-051 · Verify default branch execution ​

Encyclopedia · Gitea runner fundamentals · All snippets

Previous · CICD-050 · Next · CICD-052

1. Where it fits ​

  • Placement .gitea/workflows/ci.yml, at the workflow level for on and inside steps for uses.
  • Prerequisites Gitea Actions enabled, authorized trusted runner registered and local repository checked out when needed.
  • Platforms gitea-actions.

2. Copy the snippet ​

yaml
on:
  push:
    branches: [main]

3. How it works ​

Gitea receives a push event when a branch ref changes. This filter selects main, so test it with a commit that actually updates that ref.

4. Verify the result ​

Push a benign commit to main and check the trigger in the Gitea run details.

Watch for. Place event filters at workflow scope and test an event that should run and an event that should be skipped.

Validation syntax-validated (YAML parse). Status definitions.