No description
- Shell 100%
### Added - `scripts/check-version-sync.sh` — shared Cargo.toml ↔ CHANGELOG.md gate (local + fixtures). - `.forgejo/workflows/check_version_sync.yml` — reusable workflow (logic inlined; no second checkout). - `.forgejo/workflows/rust_crate_checks.yml` — reusable Rust crate checks (fmt, clippy, machete, deny, version sync, tests) on `ci-rust-embedded`. - `scripts/test-check-version-sync.sh` + fixtures under `tests/fixtures/`. - Project `README.md` with consumer examples. |
||
|---|---|---|
| .forgejo/workflows | ||
| scripts | ||
| tests/fixtures | ||
| CHANGELOG.md | ||
| README.md | ||
central_ci
Reusable Forgejo Actions workflows shared across HomeIoT / BHK projects.
Repo: faicel/central_ci
Layout
| Path | Role |
|---|---|
.forgejo/workflows/validate_flow.yml |
PR branch flow (*→dev, dev→staging, staging→main) |
.forgejo/workflows/check_version_sync.yml |
Cargo.toml ↔ CHANGELOG.md version gate |
.forgejo/workflows/rust_crate_checks.yml |
fmt, clippy, machete, deny, version sync, tests |
.forgejo/workflows/deploy_job_tracker.yml |
Stub / WIP |
scripts/check-version-sync.sh |
Same logic as the workflows (local / copy into crates) |
The reusable workflows inline the version-sync shell so callers do not need read
access to check out central_ci as a second repository (works across orgs with one PAT).
Companion image
Rust jobs expect the shared toolchain image:
code.bhk-itsolutions.com/homeiot/ci-rust-embedded:rust-1.97.0
(needs node for actions/checkout, plus cargo-deny / cargo-machete).
Usage — version sync only
jobs:
version:
uses: faicel/central_ci/.forgejo/workflows/check_version_sync.yml@main
secrets:
RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }}
Usage — full Rust crate checks
jobs:
checks:
uses: faicel/central_ci/.forgejo/workflows/rust_crate_checks.yml@main
secrets:
RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }}
publish:
needs: checks
runs-on: docker
# tag + cargo publish stay in the consumer workflow
Optional inputs (see workflow files for defaults):
ci_image— override the container image tagworking_directory— crate subdirectoryenable_deny/enable_machete/enable_version_synctest_command— defaultcargo test
Local test of the version-sync script
chmod +x scripts/*.sh
./scripts/test-check-version-sync.sh
Version sync convention
Consumer crates must keep these equal:
Cargo.toml→version = "x.y.z"CHANGELOG.md→ top heading## [x.y.z] - YYYY-MM-DD
Security note
Prefer pinning @vX.Y.Z (or a commit SHA) instead of @main once you tag releases of central_ci.
Protect .forgejo/**/*.yml on consumer main branches (Forgejo Protected file patterns).