add usage docs
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# ci-templates — org-weites Quality-Gate
|
||||
|
||||
Reusable Workflow fuer alle Repos (digiflo, sanube, keim, etb, swd, florian-projects).
|
||||
|
||||
## Adoption (3 Zeilen pro Repo)
|
||||
Datei `.gitea/workflows/quality.yml` im Ziel-Repo anlegen:
|
||||
|
||||
```yaml
|
||||
name: quality
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
quality:
|
||||
uses: digiflo/ci-templates/.gitea/workflows/quality.yml@main
|
||||
with:
|
||||
python: true # je nach Repo: python/node/php auf true
|
||||
# blocking: true # spaeter: SAST/Vuln/Lint hart als Gate
|
||||
```
|
||||
|
||||
## Was laeuft
|
||||
| Job | Tool | Default |
|
||||
|-----|------|---------|
|
||||
| secret-scan | gitleaks | **blockierend** (Secrets brechen immer ab) |
|
||||
| sast | semgrep (`p/ci`) | report-only |
|
||||
| vuln-scan | trivy fs (HIGH/CRITICAL) | report-only |
|
||||
| actionlint | actionlint | report-only |
|
||||
| python-lint | ruff (check+format) | opt-in, report-only |
|
||||
| node-lint | eslint | opt-in, report-only |
|
||||
| php-lint | php -l + phpstan | opt-in, report-only |
|
||||
|
||||
`blocking: true` macht SAST/Vuln/Lint zum harten Gate. Zusammen mit Branch-Protection
|
||||
(Required status checks) auf `main` wird das erzwungen.
|
||||
|
||||
## Constraint
|
||||
Runner ist `ct117-docker` (catthehacker-Image, gecached). **Keine neuen Docker-Hub-Images
|
||||
im Job ziehen** (unauth Pull-Limit) — alle Tools kommen als GitHub-Release-Binary / via pip.
|
||||
|
||||
## Cross-Org-Nutzung
|
||||
Dieses Repo ist privat. Damit Repos anderer Orgs (sanube/keim/...) den Workflow ziehen
|
||||
koennen, entweder dieses Repo auf "public" (nur harmloses CI-YAML) stellen ODER pro Org
|
||||
eine Kopie. Innerhalb `digiflo` funktioniert es sofort.
|
||||
Reference in New Issue
Block a user