From 1f8f94977cdb50a4eb66ff1d426099d11589fbd4 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Thu, 13 Aug 2026 12:09:23 +0200 Subject: [PATCH] fix url --- .gitea/workflows/build.yml | 22 +++++++++++----------- docs/gitea-actions.md | 16 +++++++++------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 132ef6a..f7b6282 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -20,7 +20,7 @@ env: ANDROID_NDK_VERSION: "27.2.12479018" # Bump the rN suffix whenever the Dockerfile toolchain must be rebuilt. REGISTRY: "registry.brunner.ninja" - BUILD_IMAGE: "registry.brunner.ninja/feedc0de/evcharger-ci:qt-6.11.1-r1" + BUILD_IMAGE: "registry.brunner.ninja/feedc0de/evcharger-app:qt-6.11.1-r1" defaults: run: @@ -57,19 +57,19 @@ jobs: REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} run: | set -Eeuo pipefail + : "${REGISTRY_USERNAME:?REGISTRY_USERNAME secret is required to access the toolchain image}" + : "${REGISTRY_PASSWORD:?REGISTRY_PASSWORD secret is required to access the toolchain image}" + + auth_file="${RUNNER_TEMP:-/tmp}/evcharger-registry-auth-${GITHUB_RUN_ID}.json" + export REGISTRY_AUTH_FILE="$auth_file" + trap 'rm -f -- "$auth_file"' EXIT + printf '%s' "$REGISTRY_PASSWORD" | podman login "$REGISTRY" \ + --username "$REGISTRY_USERNAME" \ + --password-stdin + if podman pull "$BUILD_IMAGE"; then echo "Using published toolchain image: $BUILD_IMAGE" else - : "${REGISTRY_USERNAME:?REGISTRY_USERNAME secret is required to publish a new toolchain image}" - : "${REGISTRY_PASSWORD:?REGISTRY_PASSWORD secret is required to publish a new toolchain image}" - - auth_file="${RUNNER_TEMP:-/tmp}/evcharger-registry-auth-${GITHUB_RUN_ID}.json" - export REGISTRY_AUTH_FILE="$auth_file" - trap 'rm -f -- "$auth_file"' EXIT - printf '%s' "$REGISTRY_PASSWORD" | podman login "$REGISTRY" \ - --username "$REGISTRY_USERNAME" \ - --password-stdin - echo "Toolchain image is not published yet; building $BUILD_IMAGE" podman build --pull=always \ --layers \ diff --git a/docs/gitea-actions.md b/docs/gitea-actions.md index bc29a08..040083a 100644 --- a/docs/gitea-actions.md +++ b/docs/gitea-actions.md @@ -60,18 +60,20 @@ caches stored by Gitea Actions. ## Toolchain registry credentials -Runners pull the public image anonymously. Publishing a new toolchain revision -uses the existing credentials for `registry.brunner.ninja`. Add these repository -secrets under **Settings > Actions > Secrets**: +The registry is backed by Quay. Use a Quay robot account with write access to +the `feedc0de/evcharger-app` repository; this avoids tying CI to a person's +account. Add its credentials as repository secrets under +**Settings > Actions > Secrets**: | Secret | Value | | --- | --- | -| `REGISTRY_USERNAME` | Registry account allowed to push `feedc0de/evcharger-ci` | -| `REGISTRY_PASSWORD` | Password or token for that registry account | +| `REGISTRY_USERNAME` | Quay robot username, including its namespace prefix | +| `REGISTRY_PASSWORD` | Quay robot token | The image is published as -`registry.brunner.ninja/feedc0de/evcharger-ci:qt-6.11.1-r1`. Runners only use -the credentials when the tag does not exist and must be built and pushed. +`registry.brunner.ninja/feedc0de/evcharger-app:qt-6.11.1-r1`. The workflow logs +in before pulling because this repository is not anonymously readable. The +robot needs write permission so the first run of a new revision can push it. Credentials are written to a per-job temporary authentication file and removed before the step exits.