This repository has been archived on 2026-11-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
terraform-git/README.md
T
unkin-agent 691eca53ea
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline failed
scope GitHub App secret to the github unit, use team slugs
2026-11-09 23:58:40 +11:00

48 lines
1.3 KiB
Markdown

# terraform-git
Manage Gitea resources, teams, repos, and Woodpecker CI via Terraform.
## GitHub (IUCLabs)
`config/github.com/IUCLabs/` feeds `modules/github_org` via `environments/github/iuclabs`, authenticated as a GitHub App (`kv/service/github/iuclabs/terraform`). Org membership invites are manual.
`team/<name>.yaml`:
```yaml
description: "IUCLabs maintainers"
privacy: closed
maintainers: [neoloc]
members: []
```
`ruleset/<name>.yaml` (applied per repository; org rulesets need a paid plan):
```yaml
target: branch
enforcement: active
conditions:
ref_name:
include: ["~DEFAULT_BRANCH"]
exclude: []
rules:
deletion: true
non_fast_forward: true
pull_request:
required_approving_review_count: 0
dismiss_stale_reviews_on_push: true
required_status_checks:
contexts: [ci/woodpecker]
```
`repository/<name>.yaml` (squash-only, delete branch on merge, `main` by default):
```yaml
description: "IUCLabs organisation profile"
private: false
rulesets: [default]
maintainers: ["@maintainers"]
codeowners: []
```
`maintainers` (users or `@team`) get `maintain` and seed the initial `.github/CODEOWNERS` on `auto_init` repositories, which is then left to humans. `codeowners` get `push` so they can be added to CODEOWNERS later. Private repositories cannot use rulesets on the free plan; plan fails if they do.