🔧 fix: configure Docker to trust Gitea self-signed certificate
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user