ci: publish Gitea images under the repository owner
CI / Test and publish (push) Successful in 25s

This commit is contained in:
2026-09-10 19:54:55 +04:00
parent a1b49dfb8a
commit feeee22246
2 changed files with 7 additions and 9 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
IMAGE: code.popov.link/packager/vacationplanner2ics
IMAGE: code.popov.link/valentineus/vacationplanner2ics
TEST_IMAGE: vacationplanner2ics-test:ci-${{ gitea.run_id }}
SMOKE_CONTAINER: vacationplanner2ics-ci-${{ gitea.run_id }}
REVISION: ${{ gitea.sha }}
@@ -82,13 +82,13 @@ jobs:
run: |
set -eu
if [ -z "$REGISTRY_TOKEN" ]; then
echo 'Add the REGISTRY_TOKEN Actions secret: a packager PAT with write:package.' >&2
echo 'Add the REGISTRY_TOKEN Actions secret: a valentineus PAT with write:package.' >&2
exit 1
fi
export DOCKER_CONFIG
DOCKER_CONFIG="$(mktemp -d)"
trap 'rm -rf "$DOCKER_CONFIG"' EXIT
printf '%s' "$REGISTRY_TOKEN" | docker login code.popov.link --username packager --password-stdin
printf '%s' "$REGISTRY_TOKEN" | docker login code.popov.link --username valentineus --password-stdin
docker push "$IMAGE:sha-$REVISION"
if [ "$REF" = refs/heads/master ]; then
docker tag "$IMAGE:sha-$REVISION" "$IMAGE:latest"
+4 -6
View File
@@ -12,7 +12,7 @@ builds and publishes its own image:
| Registry | Package | Image |
| --- | --- | --- |
| GitHub Container Registry | [GitHub package](https://github.com/valentineus/vacationplanner2ics/pkgs/container/vacationplanner2ics) | `ghcr.io/valentineus/vacationplanner2ics:latest` |
| Gitea Container Registry | [Gitea package](https://code.popov.link/packager/-/packages/container/vacationplanner2ics/latest) | `code.popov.link/packager/vacationplanner2ics:latest` |
| Gitea Container Registry | [Gitea package](https://code.popov.link/valentineus/-/packages/container/vacationplanner2ics/latest) | `code.popov.link/valentineus/vacationplanner2ics:latest` |
Available tags:
@@ -26,12 +26,10 @@ Pull from GitHub:
docker pull ghcr.io/valentineus/vacationplanner2ics:latest
```
Gitea currently requires a `packager` token with `read:package` permission.
Enter the token at the password prompt:
Or pull from Gitea:
```sh
docker login code.popov.link --username packager
docker pull code.popov.link/packager/vacationplanner2ics:latest
docker pull code.popov.link/valentineus/vacationplanner2ics:latest
```
## Self-hosted usage
@@ -164,7 +162,7 @@ Both workflows build natively on AMD64, limit compilation to two jobs and packag
the already-tested binary. Gitea reuses the runner's BuildKit/Cargo caches;
GitHub saves Docker build layers in its Actions cache.
Gitea publishing uses the Actions secret `REGISTRY_TOKEN`, belonging to `packager`
Gitea publishing uses the Actions secret `REGISTRY_TOKEN`, belonging to `valentineus`
with `write:package` permission. GitHub uses its automatic `GITHUB_TOKEN` with
`packages: write`; no extra publishing secret is needed. No Vacationplanner
token is used in either CI.