fix: use skopeo with internal Gitea service to bypass Traefik timeout

This commit is contained in:
luochen570
2026-07-15 00:05:07 +08:00
parent 9068c3eb02
commit 4498dc720c

View File

@@ -29,15 +29,29 @@ jobs:
docker buildx create --use --driver docker-container --name builder 2>/dev/null || true
docker buildx inspect --bootstrap
- name: Login to Gitea Container Registry
run: echo "${{ secrets.CHECKOUT_TOKEN }}" | docker login git.luochen570.cn -u luochen570 --password-stdin
- name: Build and push (multi-arch)
- name: Build image (multi-arch, export to daemon)
run: |
TAG_WEEKLY="weekly-$(date +%Y%m%d)"
docker buildx build \
--platform linux/amd64,linux/arm64 \
--push \
-t "git.luochen570.cn/luochen570/luochen570-cli:latest" \
-t "git.luochen570.cn/luochen570/luochen570-cli:${TAG_WEEKLY}" \
--load \
-t luochen570-cli:latest \
.
- 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