cozystack/.github/workflows
myasnikovdaniil 82d1f8a1d2
ci(api): add codegen drift check (#2463)
## What this PR does

- Adds a pre-commit hook and a dedicated GitHub Actions workflow that
run `make generate` at the repo root to catch drift in generated API
code (CRDs, DeepCopy, clients, RBAC) before it lands on main.
- Pre-commit hook is scoped to paths that actually affect codegen
(`api/`, `pkg/apis/`, `hack/update-codegen.sh`,
`hack/boilerplate.go.txt`) so unrelated commits are not slowed down.
- CI workflow (`.github/workflows/codegen-drift.yml`) installs Go from
`go.mod`, runs `make generate`, and fails on drift with an error
pointing contributors to the local fix.
- Includes one drift fix the check surfaced: `RestoreJobSpec.Options`
(added in #2437) had no `DeepCopyInto` handling — regenerated.

### Release note

```release-note
ci(api): add pre-commit hook and GitHub Actions workflow that verify generated API code (CRDs, deepcopy, clients, RBAC) is in sync with `make generate`.
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Added a CI workflow that checks generated code during PRs and fails
the build if generated artifacts diverge.
* Added a pre-commit hook that runs generation checks locally to prevent
committing outdated generated files.
* Fixed deep-copy behavior for backup restore job specs so nested
options are correctly duplicated.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-28 12:41:48 +05:00
..
auto-release.yaml ci: use cozystack org noreply email for bot commits 2026-04-13 16:29:07 +02:00
backport.yaml [ci] Update korthout/backport-action@v3.2.1 2025-12-09 14:34:37 +01:00
codegen-drift.yml ci(api): broaden codegen drift trigger paths and detect untracked files 2026-04-23 22:19:35 +05:00
labels.yaml chore(ci): adopt CNCF/k8s label conventions 2026-04-27 03:15:09 +03:00
pr-labeler.yaml chore(ci): warn on unmapped type or scope in pr-labeler 2026-04-27 13:07:39 +03:00
pre-commit.yml [docs] Update cozyvalues-gen 2026-03-25 15:59:22 +05:00
pull-requests-release.yaml ci: use cozystack org noreply email for bot commits 2026-04-13 16:29:07 +02:00
pull-requests.yaml ci(pull-requests): replace GH_PAT with cozystack-ci GitHub App token 2026-04-13 09:28:52 +02:00
retest.yaml feat(ci): add /retest command to rerun tests from Prepare environment 2026-01-02 21:23:27 +01:00
tags.yaml chore(ci): adopt CNCF/k8s label conventions 2026-04-27 03:15:09 +03:00
update-releasenotes.yaml [workflow] Add GitHub Action to update release notes from changelogs 2025-12-24 15:02:04 +01:00