feat: scaffold deployment-policies monorepo
ci / verify (push) Failing after 10m57s
ci / publish (push) Skipped

OPA/Rego deployment gateway policies: 5 rules (valid-environment,
require-approvals, no-self-approval, block-weekends, freeze-window),
a deploy-gate combining them, JSON schemas, scenario-driven tests,
Gitea Actions CI (verify + publish to generic registry), changesets
versioning, Makefile and scripts.
This commit is contained in:
jdevega
2026-09-15 19:05:03 +02:00
commit 59cacfdfab
48 changed files with 1703 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# Changesets
This repository uses [Changesets](https://github.com/changesets/changesets) to version the OPA
policy packages. Every `policies/rules/*` and `policies/gates/*` package is an independent npm
workspace; changesets records which packages changed so versions can be bumped consistently.
## Adding a changeset
Run from the repository root:
```sh
make changeset
```
It opens an interactive prompt: select the packages you changed, the bump type (`patch` for
fixes/behaviour tweaks, `minor` for new rules, `major` for breaking input/data contract changes)
and a summary. This writes a file under `.changeset/`.
Commit the changeset file together with your policy code changes.
## Releasing
When changesets are present on `main`, run:
```sh
make version
```
This applies all changesets, rewrites the `version` field of affected `package.json`s and
regenerates `CHANGELOG.md` files (formatted with `oxfmt`). Commit the resulting bump.
Bundles are built from `package.json#version`, so the registry upload uses the new version.
## Gitea Actions
CI verifies (format, lint, schema check, tests) and builds bundles on every push/PR. On `main`
the `publish` job uploads the bundles to the Gitea generic package registry using the
`GITEA_TOKEN` repository secret (requires `write:package` scope).
+16
View File
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"format": "oxfmt",
"privatePackages": {
"version": true,
"tag": false
}
}