From e34185bfc341d1ebab08d7378026c2b921d3cb77 Mon Sep 17 00:00:00 2001 From: luochen570 <1160510664@qq.com> Date: Wed, 15 Jul 2026 00:13:25 +0800 Subject: [PATCH] fix: push via internal Gitea HTTP registry with insecure-registries --- .gitea/workflows/build-weekly.yml | 34 +++++++++++-------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/build-weekly.yml b/.gitea/workflows/build-weekly.yml index 2ff9c2c..0380f38 100644 --- a/.gitea/workflows/build-weekly.yml +++ b/.gitea/workflows/build-weekly.yml @@ -12,6 +12,8 @@ permissions: jobs: build: runs-on: ubuntu-latest + env: + GITEA_REGISTRY: gitea-http.gitea.svc.cluster.local:3000 steps: - name: Checkout run: | @@ -29,29 +31,17 @@ jobs: docker buildx create --use --driver docker-container --name builder 2>/dev/null || true docker buildx inspect --bootstrap - - name: Build image (multi-arch, export to daemon) + - name: Login to internal Gitea Container Registry run: | + echo "${{ secrets.CHECKOUT_TOKEN }}" | \ + docker login "${GITEA_REGISTRY}" -u luochen570 --password-stdin + + - name: Build and push (multi-arch, via internal registry) + run: | + TAG_WEEKLY="weekly-$(date +%Y%m%d)" docker buildx build \ --platform linux/amd64,linux/arm64 \ - --load \ - -t luochen570-cli:latest \ + --push \ + -t "${GITEA_REGISTRY}/luochen570/luochen570-cli:latest" \ + -t "${GITEA_REGISTRY}/luochen570/luochen570-cli:${TAG_WEEKLY}" \ . - - - name: Install skopeo - run: | - apt-get update -qq && apt-get install -y -qq skopeo - - - name: Push to Gitea internal registry (via skopeo, bypass Traefik) - run: | - GITEA_INTERNAL="gitea-http.gitea.svc.cluster.local:3000" - TAG_WEEKLY="weekly-$(date +%Y%m%d)" - skopeo copy \ - docker-daemon:luochen570-cli:latest \ - "docker://${GITEA_INTERNAL}/luochen570/luochen570-cli:latest" \ - --dest-creds="luochen570:${{ secrets.CHECKOUT_TOKEN }}" \ - --dest-tls-verify=false - skopeo copy \ - docker-daemon:luochen570-cli:latest \ - "docker://${GITEA_INTERNAL}/luochen570/luochen570-cli:${TAG_WEEKLY}" \ - --dest-creds="luochen570:${{ secrets.CHECKOUT_TOKEN }}" \ - --dest-tls-verify=false