fix mby v7
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m4s

This commit is contained in:
Gal Podlipnik 2025-06-09 03:08:06 +02:00
parent 51428eb2f5
commit 90bf7264b3

View File

@ -26,30 +26,17 @@ jobs:
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin
# Add step to configure Docker for possible insecure registry
- name: Configure Docker for Harbor
run: |
mkdir -p /etc/docker
echo '{"insecure-registries": ["harbor.galpodlipnik.com"]}' > /etc/docker/daemon.json
# Restart Docker to apply changes
service docker restart || true
# Add some diagnostic info
echo "Testing connectivity to Harbor..."
curl -v --connect-timeout 10 https://harbor.galpodlipnik.com || echo "Connection failed but continuing"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Login to Harbor with retries
- name: Login to Harbor
uses: docker/login-action@v3
with:
registry: harbor.galpodlipnik.com
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
# Add a longer timeout for login attempts
timeout: 180
- name: Build and push
uses: docker/build-push-action@v5
@ -57,5 +44,5 @@ jobs:
context: .
push: true
tags: harbor.galpodlipnik.com/project/docker-inspector:latest
cache-from: type=registry,ref=harbor.galpodlipnik.com/project/docker-inspector:buildcache
cache-to: type=registry,ref=harbor.galpodlipnik.com/project/docker-inspector:buildcache,mode=max
cache-from: type=registry,ref=harbor.galpodlipnik.com/docker-inspector:buildcache
cache-to: type=registry,ref=harbor.galpodlipnik.com/docker-inspector:buildcache,mode=max