Persist coverage badge SVG to stable URL for README embedding #42

Closed
opened 2026-03-13 14:33:45 +00:00 by kert · 0 comments
Owner

Problem

The coverage badge SVG is generated in the CI container but lost when the container exits. There is no stable URL to embed in README or docs.

Fix

Upload to Gitea's generic package registry after each CI run:

curl -sf -X PUT \
  -H "Authorization: token $GITEA_TOKEN" \
  --upload-file coverage.svg \
  "$GITEA_URL/api/packages/homelab/generic/coverage/latest/badge.svg"

Then in README:

![coverage](https://gitea.homelab.fhirworx.io/api/packages/homelab/generic/coverage/latest/badge.svg)

Use failure: ignore so badge upload failures don't block the pipeline.

Acceptance criteria

  • Badge SVG is uploaded to a stable URL after each CI run
  • Badge URL returns valid SVG with current coverage percentage
  • README displays the badge
## Problem The coverage badge SVG is generated in the CI container but lost when the container exits. There is no stable URL to embed in README or docs. ## Fix Upload to Gitea's generic package registry after each CI run: ```shell curl -sf -X PUT \ -H "Authorization: token $GITEA_TOKEN" \ --upload-file coverage.svg \ "$GITEA_URL/api/packages/homelab/generic/coverage/latest/badge.svg" ``` Then in README: ```markdown ![coverage](https://gitea.homelab.fhirworx.io/api/packages/homelab/generic/coverage/latest/badge.svg) ``` Use `failure: ignore` so badge upload failures don't block the pipeline. ## Acceptance criteria - Badge SVG is uploaded to a stable URL after each CI run - Badge URL returns valid SVG with current coverage percentage - README displays the badge
kert added this to the P9: CI/CD Unification milestone 2026-03-13 14:33:45 +00:00
kert added the quality label 2026-03-13 14:33:45 +00:00
kert closed this issue 2026-03-13 14:48:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: homelab/stack#42