gunk-dev/the-valley

protected.cue

source717c3f491550main's published tip history
1.3 KiB
1// The host the flake's protect-e2e check drives: the four states a
2// project's refs can be in. "sealed" is the norm — protected, with no
3// writer, so nothing pushes to it and changes land by integration.
4// "guarded" declares the writers exception over the default protected set,
5// "released" names a wildcard pattern beside it and grants release tags to
6// the principal that cuts them, and "open" declares no protection at all,
7// so it protects no ref and every other rule of the push policy still
8// applies to it.
9//
10// Which keys act as the "integrator" principal is machine integration
11// (services.valley.authorizedKeys), not declared here — the name is what
12// the identity registry will bind, and this declaration is what names it.
13package valley
14
15projects: {
16 "sealed": protection: refs: ["refs/heads/main"]
17
18 "guarded": protection: writers: ["integrator"]
19
20 // released's protection also covers its integration requests, so a
21 // request there needs both a declared writer and the request grant.
22 "released": protection: {
23 refs: ["refs/heads/main", "refs/heads/release/*", "refs/the-valley/integration-requests/*"]
24 writers: ["integrator"]
25 }
26 "released": grants: "release-tags": {
27 refs: ["refs/tags/release/*"]
28 writers: ["integrator"]
29 }
30
31 "open": {}
32}