This commit is contained in:
1 file changed
+19
@@ -29,6 +29,21 @@ This repository is registered as a **scoped workflow source** for the `kosmos`
|
||||
org. `.gitea/scoped_workflows/required-labels.yaml` then runs on every org
|
||||
repository and, once marked **required**, gates merges.
|
||||
|
||||
The scoped workflow calls the action by absolute URL
|
||||
(`https://gitea.kosmos.org/kosmos/actions/required-labels@v1`). The `self:`
|
||||
prefix is documented as equivalent, but on this Gitea/runner combination a
|
||||
step-level `uses: self:...` failed before any job started, while the FQDN form
|
||||
works.
|
||||
|
||||
Rollout (one-off, UI-only — Gitea exposes no API for this):
|
||||
|
||||
1. **Org Settings → Actions → Scoped Workflows** → add `kosmos/actions`.
|
||||
2. Leave it **not required** and soak: confirm the `Required labels` check runs
|
||||
on a test repository (e.g. `kosmos/test-one-two`).
|
||||
3. Mark `required-labels.yaml` **required** with status-check pattern
|
||||
`kosmos/actions: Required labels / *`. Note: a required check only gates
|
||||
target branches that have a branch-protection rule.
|
||||
|
||||
Configuration is done with Actions variables (org default, per-repo override):
|
||||
|
||||
- `REQUIRED_PR_LABELS` — the required labels/regexes. Org default:
|
||||
@@ -37,6 +52,10 @@ Configuration is done with Actions variables (org default, per-repo override):
|
||||
|
||||
A repository opts out by setting `REQUIRED_PR_LABELS` to `disabled`.
|
||||
|
||||
The check is **fail-open**: an empty `REQUIRED_PR_LABELS` passes. The repo's own
|
||||
test workflow asserts the org variable is non-empty so an accidental wipe is
|
||||
noticed.
|
||||
|
||||
### GitHub (per-repo)
|
||||
|
||||
```yaml
|
||||
|
||||
Reference in new issue
Block a user