Skip to content

Workflow directories

Most Git hosts read CI workflows from one directory only. If .forgejo/workflows/ exists, .github/workflows/ is skipped. Codebahn reads all four, which helps when you run CI on both Codebahn and another host, or migrate one workflow at a time.

If you are setting up CI for the first time, start with Set up CI. This page covers where workflow files can live once you have them.

Codebahn scans these directories and merges the results, in order of precedence:

  1. .codebahn/workflows/ (highest)
  2. .forgejo/workflows/
  3. .gitea/workflows/
  4. .github/workflows/ (lowest)

Every .yml and .yaml file across these directories runs. When the same filename appears in more than one directory, the higher-precedence directory wins and the duplicates are skipped.

Given this repository:

.codebahn/workflows/
deploy.yml # Codebahn-specific deploy
.forgejo/workflows/
deploy.yml # skipped (same name, lower precedence)
lint.yml # runs
.github/workflows/
ci.yml # runs
lint.yml # skipped (same name, lower precedence)

Codebahn runs three workflows: deploy.yml from .codebahn/, lint.yml from .forgejo/, and ci.yml from .github/.

Merging is specific to Codebahn. Hosts that read a single directory ignore it, so if you need the same workflows to run on Codebahn and elsewhere, keep them in one directory.