From 8b1556c0342331f2a8cde9c1d72a9fabf0924675 Mon Sep 17 00:00:00 2001 From: Oussama Douhou Date: Sat, 10 Jan 2026 14:38:53 +0100 Subject: [PATCH] docs: add Gitea Actions workflow status checking documentation - Add API endpoint and curl commands to check CI status - Document authentication with Authorization: token header - Add response field descriptions (status, conclusion) - Reference BWS key for GITEA_API_TOKEN --- CLAUDE.md | 33 ++++++++++++++++++++++++++ docs/TESTING.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index c1fea4f..9a86897 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -416,6 +416,39 @@ Grafana service account token stored in BWS: - Key: `GRAFANA_OPENCODE_ACCESS_TOKEN` - BWS ID: `c77e58e3-fb34-41dc-9824-b3ce00da18a0` +## CI/CD - Gitea Actions + +The `oh-my-opencode-free` Docker image is built automatically via Gitea Actions on push to main. + +### Check Workflow Status + +**Web UI:** +``` +https://git.app.flexinit.nl/oussamadouhou/oh-my-opencode-free/actions +``` + +**API:** +```bash +# Get token from BWS (key: GITEA_API_TOKEN) +GITEA_TOKEN="" + +# List recent runs with status +curl -s -H "Authorization: token $GITEA_TOKEN" \ + "https://git.app.flexinit.nl/api/v1/repos/oussamadouhou/oh-my-opencode-free/actions/runs?limit=5" | \ + jq '.workflow_runs[] | {run_number, status, conclusion, display_title, head_sha: .head_sha[0:7]}' +``` + +### API Response Fields + +| Field | Values | +|-------|--------| +| `status` | `queued`, `in_progress`, `completed` | +| `conclusion` | `success`, `failure`, `cancelled`, `skipped` | + +### Credentials + +- **GITEA_API_TOKEN** - Gitea API access (stored in BWS) + ## Project Status ✅ **Completed**: diff --git a/docs/TESTING.md b/docs/TESTING.md index 2e4c86f..7d5f455 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -200,3 +200,64 @@ source .env && curl -s -H "x-api-key: $DOKPLOY_API_TOKEN" \ "https://app.flexinit.nl/api/project.one?projectId=" | \ jq '.environments[0].applications[0] | {name: .name, status: .applicationStatus}' ``` + +--- + +## Gitea Actions CI/CD Status + +### Check Workflow Status + +The `oh-my-opencode-free` Docker image is built via Gitea Actions. To check CI status: + +**Web UI:** +``` +https://git.app.flexinit.nl/oussamadouhou/oh-my-opencode-free/actions +``` + +**API (requires token):** +```bash +# Get GITEA_API_TOKEN from BWS (key: GITEA_API_TOKEN) +GITEA_TOKEN="" + +# List recent workflow runs +curl -s -H "Authorization: token $GITEA_TOKEN" \ + "https://git.app.flexinit.nl/api/v1/repos/oussamadouhou/oh-my-opencode-free/actions/runs?limit=5" | \ + jq '.workflow_runs[] | {id, run_number, status, conclusion, display_title, head_sha: .head_sha[0:7]}' + +# Get specific run details +curl -s -H "Authorization: token $GITEA_TOKEN" \ + "https://git.app.flexinit.nl/api/v1/repos/oussamadouhou/oh-my-opencode-free/actions/runs/" | jq . + +# Get jobs for a specific run +curl -s -H "Authorization: token $GITEA_TOKEN" \ + "https://git.app.flexinit.nl/api/v1/repos/oussamadouhou/oh-my-opencode-free/actions/runs//jobs" | jq . +``` + +### API Response Fields + +| Field | Description | +|-------|-------------| +| `status` | `queued`, `in_progress`, `completed` | +| `conclusion` | `success`, `failure`, `cancelled`, `skipped` (only when status=completed) | +| `head_sha` | Commit SHA that triggered the run | +| `run_number` | Sequential run number | +| `display_title` | Commit message or PR title | + +### Gitea API Authentication + +From [Gitea docs](https://docs.gitea.com/development/api-usage): + +```bash +# Header format +Authorization: token + +# Alternative: query parameter +?token= +``` + +### BWS Token Reference + +| Key | Purpose | +|-----|---------| +| `GITEA_API_TOKEN` | Gitea API access for workflow status | +| `DOKPLOY_API_TOKEN` | Dokploy deployment API (BWS ID: `6b3618fc-ba02-49bc-bdc8-b3c9004087bc`) |