WIP: Publish container image to Gitea registry on tag pushes #15

Draft
raucao wants to merge 1 commits from ci/container-build-on-tags into master
pull from: ci/container-build-on-tags
Owner

Adds .gitea/workflows/publish-image.yml, a new Gitea Actions workflow that builds the root Dockerfile and pushes the resulting image to gitea.kosmos.org/5apps/liquor-cabinet, tagged with the pushed git tag name. The existing ci.yml is untouched.

It triggers on any tag push (tags: ["*"]), checks out with builtin:checkout, logs in to the registry, and runs docker build plus docker push. The registry host and image path live in a top-level env block so they are easy to change. Authentication uses a personal access token (secrets.REGISTRY_USERNAME and secrets.REGISTRY_TOKEN) because Gitea's automatic job token cannot publish to the package registry. The Docker tag is derived from GITHUB_REF_NAME with / replaced by -, since git tag names can contain characters that are invalid in Docker tags.

Open questions / uncertainties

  • Docker availability on the runner. The gitea.kosmos.org runner configuration could not be inspected. If ubuntu-latest maps to a job container without a Docker CLI/socket, both the login and build steps will fail. The workflow omits container: (the dedicated CI image has no Docker CLI) and assumes a Docker-capable runner; this should be confirmed with a test run before relying on it.
  • Required secrets. REGISTRY_USERNAME and REGISTRY_TOKEN must exist as repository or organization secrets, and the PAT's user needs write access to the 5apps/liquor-cabinet package.
  • Tag scope. tags: ["*"] fires on every tag. If only version tags should publish, narrow it (e.g. v* or [0-9]*).
Adds `.gitea/workflows/publish-image.yml`, a new Gitea Actions workflow that builds the root `Dockerfile` and pushes the resulting image to `gitea.kosmos.org/5apps/liquor-cabinet`, tagged with the pushed git tag name. The existing `ci.yml` is untouched. It triggers on any tag push (`tags: ["*"]`), checks out with `builtin:checkout`, logs in to the registry, and runs `docker build` plus `docker push`. The registry host and image path live in a top-level `env` block so they are easy to change. Authentication uses a personal access token (`secrets.REGISTRY_USERNAME` and `secrets.REGISTRY_TOKEN`) because Gitea's automatic job token cannot publish to the package registry. The Docker tag is derived from `GITHUB_REF_NAME` with `/` replaced by `-`, since git tag names can contain characters that are invalid in Docker tags. ## Open questions / uncertainties - **Docker availability on the runner.** The gitea.kosmos.org runner configuration could not be inspected. If `ubuntu-latest` maps to a job container without a Docker CLI/socket, both the login and build steps will fail. The workflow omits `container:` (the dedicated CI image has no Docker CLI) and assumes a Docker-capable runner; this should be confirmed with a test run before relying on it. - **Required secrets.** `REGISTRY_USERNAME` and `REGISTRY_TOKEN` must exist as repository or organization secrets, and the PAT's user needs write access to the `5apps/liquor-cabinet` package. - **Tag scope.** `tags: ["*"]` fires on every tag. If only version tags should publish, narrow it (e.g. `v*` or `[0-9]*`).
raucao added 1 commit 2026-11-04 11:46:56 +00:00
Build the root Dockerfile and push to gitea.kosmos.org/5apps/liquor-cabinet, tagged with the pushed git tag name.
raucao added the dev environment label 2026-11-04 11:51:55 +00:00
All checks were successful
CI / test (pull_request) Successful in 22s
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin ci/container-build-on-tags:ci/container-build-on-tags
git checkout ci/container-build-on-tags
Sign in to join this conversation.