Restructure repository into output workspace
This commit is contained in:
39
output/docs/CI_CD_GITEA.md
Normal file
39
output/docs/CI_CD_GITEA.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Gitea CI/CD and Registry Integration
|
||||
|
||||
This project uses the Gitea Actions runner and the built-in container registry hosted at `https://git.knownelement.com`. The workflow definition lives under `output/.gitea/workflows/ci.yml` and targets the Gitea Actions runtime (1.21+) alongside the built-in container registry available on current releases. The workflow is currently configured for manual `workflow_dispatch` runs so all routine testing stays on the local harness until a runner is available. citeturn0search0turn1search0
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. **Enable Actions** on the Gitea instance and mirror required upstream actions (`actions/checkout@v4`, optional others) via the "Actions" admin panel. citeturn0search0
|
||||
2. **Provision a runner** (e.g. `act_runner`) with Docker access so jobs can launch containers. citeturn0search5
|
||||
3. **Authenticate to the registry** by generating a Gitea access token (scope `write:package`) and logging in via Docker:
|
||||
```bash
|
||||
docker login git.knownelement.com -u <username> -p <token>
|
||||
```
|
||||
citeturn1search0
|
||||
|
||||
## Workflow overview
|
||||
|
||||
The manual `workflow_dispatch` job builds the CI image and then executes the same commands you run locally via:
|
||||
|
||||
```bash
|
||||
./output/run/dev.sh python output/scripts/lint_repo.py --slug apache-apisix --strict
|
||||
./output/run/dev.sh python output/scripts/generate_status.py --preserve-timestamp
|
||||
```
|
||||
|
||||
> Re-enable push/PR triggers once a runner is available and the commands above consistently succeed.
|
||||
|
||||
## Container registry usage
|
||||
|
||||
- Tag Cloudron packages against the registry namespace, e.g. `git.knownelement.com/knel/cloudron/apache-apisix:<version>`.
|
||||
- Build and push images directly via Docker:
|
||||
```bash
|
||||
docker build -t git.knownelement.com/knel/cloudron-packager output/docker/packager
|
||||
docker push git.knownelement.com/knel/cloudron-packager
|
||||
```
|
||||
- Cloudron’s CLI can push directly to the registry once you log in within the packager shell (`./output/run/packager.sh`).
|
||||
|
||||
## Future enhancements
|
||||
|
||||
- Add lint/status checks as required gates in Gitea branch protection.
|
||||
- Extend the workflow with matrix builds for priority apps (e.g. run smoke scripts once implemented).
|
Reference in New Issue
Block a user