From 300188f729329139d8ed0cbd9e00d8947883cc6c Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Sun, 20 Sep 2026 21:16:52 +0200 Subject: make it work with new registry url --- .gitea/workflows/main.yml | 24 ++++++++++++------------ .gitea/workflows/mirror.yml | 6 +++--- .scripts.d/20-build.sh | 17 ++++++++++++++--- .scripts.d/30-test.sh | 7 +++++-- .scripts.d/40-publish.sh | 13 ++++++++++++- Dockerfile | 4 ++-- 6 files changed, 48 insertions(+), 23 deletions(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 25f2393..65b1907 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -10,10 +10,10 @@ jobs: find-latest-version: runs-on: ubuntu-latest container: - image: gitea.segundo.io/docker/ci-base:latest + image: "${{ env.GITEA_REGISTRY_URL }}/docker/ci-base:latest" credentials: - username: "${GITEA_REGISTRY_TOKEN}" - password: "${GITEA_REGISTRY_USER}" + username: "${{ env.GITEA_REGISTRY_USER }}" + password: "${{ env.GITEA_REGISTRY_TOKEN }}" outputs: lt-version: ${{ steps.find-lt-version.outputs.lt-version }} steps: @@ -42,10 +42,10 @@ jobs: env: LT_VERSION: ${{ needs.find-latest-version.outputs.lt-version }} container: - image: gitea.segundo.io/docker/ci-base:latest + image: "${{ env.GITEA_REGISTRY_URL }}/docker/ci-base:latest" credentials: - username: "${GITEA_REGISTRY_TOKEN}" - password: "${GITEA_REGISTRY_USER}" + username: "${{ env.GITEA_REGISTRY_USER }}" + password: "${{ env.GITEA_REGISTRY_TOKEN }}" steps: - uses: actions/checkout@v5 - run: | @@ -55,10 +55,10 @@ jobs: runs-on: ubuntu-latest needs: build container: - image: gitea.segundo.io/docker/ci-base:latest + image: "${{ env.GITEA_REGISTRY_URL }}/docker/ci-base:latest" credentials: - username: "${GITEA_REGISTRY_TOKEN}" - password: "${GITEA_REGISTRY_USER}" + username: "${{ env.GITEA_REGISTRY_USER }}" + password: "${{ env.GITEA_REGISTRY_TOKEN }}" steps: - uses: actions/checkout@v5 - run: | @@ -70,10 +70,10 @@ jobs: env: LT_VERSION: ${{ needs.find-latest-version.outputs.lt-version }} container: - image: gitea.segundo.io/docker/ci-base:latest + image: "${{ env.GITEA_REGISTRY_URL }}/docker/ci-base:latest" credentials: - username: "${GITEA_REGISTRY_TOKEN}" - password: "${GITEA_REGISTRY_USER}" + username: "${{ env.GITEA_REGISTRY_USER }}" + password: "${{ env.GITEA_REGISTRY_TOKEN }}" steps: - uses: actions/checkout@v5 - run: | diff --git a/.gitea/workflows/mirror.yml b/.gitea/workflows/mirror.yml index 901dc86..6586ca4 100644 --- a/.gitea/workflows/mirror.yml +++ b/.gitea/workflows/mirror.yml @@ -11,10 +11,10 @@ jobs: if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest container: - image: gitea.segundo.io/docker/ci-base:latest + image: "${{ env.GITEA_REGISTRY_URL }}/docker/ci-base:latest" credentials: - username: "${GITEA_REGISTRY_TOKEN}" - password: "${GITEA_REGISTRY_USER}" + username: "${{ env.GITEA_REGISTRY_USER }}" + password: "${{ env.GITEA_REGISTRY_TOKEN }}" steps: - uses: actions/checkout@v5 diff --git a/.scripts.d/20-build.sh b/.scripts.d/20-build.sh index a78c16b..1e595d8 100644 --- a/.scripts.d/20-build.sh +++ b/.scripts.d/20-build.sh @@ -19,10 +19,21 @@ function cleanup() { } trap cleanup EXIT -echo "${GITEA_REGISTRY_TOKEN}" | - docker login "${REGISTRY}" -u "${GITEA_REGISTRY_USER}" --password-stdin +>&2 echo "Logging to ${REGISTRY}" +mkdir -p ~/.docker +auth=$(printf '%s:%s' "$GITEA_REGISTRY_USER" "$GITEA_REGISTRY_TOKEN" | base64 -w0) +cat > ~/.docker/config.json < /tmp/buildkitd.toml <goss-full.yaml mv goss-full.yaml goss.yaml -echo "${GITEA_REGISTRY_TOKEN}" | - docker login "${REGISTRY}" -u "${GITEA_REGISTRY_USER}" --password-stdin +mkdir -p ~/.docker +auth=$(printf '%s:%s' "$GITEA_REGISTRY_USER" "$GITEA_REGISTRY_TOKEN" | base64 -w0) +cat > ~/.docker/config.json < ~/.docker/config.json < ~/.config/containers/registries.conf <