From 4be08d5f36423b73e906158e49d4589a1a4fc49e Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Tue, 7 Apr 2026 11:01:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix:=20configure=20Docker=20to?= =?UTF-8?q?=20trust=20Gitea=20self-signed=20certificate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-cd.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitea/workflows/ci-cd.yaml b/.gitea/workflows/ci-cd.yaml index 60b1af3..5d786b4 100644 --- a/.gitea/workflows/ci-cd.yaml +++ b/.gitea/workflows/ci-cd.yaml @@ -91,6 +91,21 @@ jobs: echo "cache_hit=false" >> $GITHUB_OUTPUT fi + - name: Configure Docker to trust Gitea self-signed certificate + if: steps.check_cache.outputs.cache_hit == 'false' + run: | + # Create Docker certs directory for our registry + sudo mkdir -p /etc/docker/certs.d/${{ env.CI_REGISTRY }} + + # Copy the CA certificate that's already available in the runner + sudo cp /usr/local/share/ca-certificates/root_ca.crt /etc/docker/certs.d/${{ env.CI_REGISTRY }}/ca.crt + + # Update CA certificates and restart Docker + sudo update-ca-certificates + sudo systemctl restart docker || echo "Docker restart may not be supported in this environment" + + echo "✅ Docker configured to trust Gitea registry certificate" + - name: Login to Gitea Container Registry if: steps.check_cache.outputs.cache_hit == 'false' uses: docker/login-action@v3