From 657c33927b275ba8c74b048fcb2ab8f3fccd9a05 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sun, 8 Feb 2026 01:59:19 -0600 Subject: [PATCH] feat(ci): Add package linking to repository Link all Docker container packages to the mosaic/stack repository using Gitea's package API. This makes packages visible on the repository page and shows which repo they came from. API endpoint: /packages/{owner}/container/{name}/-/link/{repo_name} Links created for: - mosaic/api - mosaic/web - mosaic/postgres - mosaic/openbao - mosaic/orchestrator Each package will now show up in the repository's packages tab. --- .woodpecker.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 9bf8663..17f0b52 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -264,3 +264,34 @@ steps: event: [push, manual, tag] depends_on: - build + + # ====================== + # Link Packages to Repository + # ====================== + # Links all Docker packages to the mosaic/stack repository + # This makes packages visible on the repository page in Gitea + link-packages: + image: alpine:latest + environment: + GITEA_TOKEN: + from_secret: gitea_token + commands: + - apk add --no-cache curl + - | + # Link all container packages to the repository + for package in api web postgres openbao orchestrator; do + echo "Linking package mosaic/${package} to repository stack..." + curl -X PUT \ + -H "Authorization: token $GITEA_TOKEN" \ + -H "Content-Type: application/json" \ + "https://git.mosaicstack.dev/api/v1/packages/mosaic/container/${package}/-/link/stack" || echo "Failed to link ${package} (may not exist yet)" + done + when: + - branch: [main, develop] + event: [push, manual, tag] + depends_on: + - docker-build-api + - docker-build-web + - docker-build-postgres + - docker-build-openbao + - docker-build-orchestrator