From afa9e2835a8118ebc36d4fa36cb894d702e3ab2b Mon Sep 17 00:00:00 2001 From: Alessio Dal Santo Date: Tue, 27 Jan 2026 17:21:20 +0100 Subject: [PATCH] Fix: Configurazione workflow Gitea per registry insecure - Aggiunta configurazione buildx per registry con http/insecure - Sostituito login-action con autenticazione manuale tramite config.json - Aggiornate versioni actions (buildx v3, build-push v6) - Aggiunto provenance: false e outputs con registry.insecure=true --- .gitea/workflows/docker-build.yml | 32 ++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index a43fcc7..a809aed 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -30,7 +30,15 @@ jobs: platforms: linux/arm/v7,linux/arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 + with: + driver-opts: | + image=moby/buildkit:latest + network=host + config-inline: | + [registry."gitea.home-nas-ds.org"] + http = true + insecure = true - name: Docker meta id: meta @@ -47,14 +55,22 @@ jobs: - name: Login to Gitea Container Registry if: github.event_name != 'pull_request' - uses: docker/login-action@v2 - with: - registry: gitea.home-nas-ds.org - username: ${{ github.actor }} - password: ${{ secrets.REGISTRY_TOKEN }} + run: | + echo "Configurazione autenticazione registry..." + mkdir -p ~/.docker + AUTH=$(echo -n "${{ github.actor }}:${{ secrets.REGISTRY_TOKEN }}" | base64) + cat > ~/.docker/config.json << EOF + { + "auths": { + "gitea.home-nas-ds.org": { + "auth": "$AUTH" + } + } + } + EOF - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile.multiarch @@ -68,6 +84,8 @@ jobs: VCS_REF=${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max + provenance: false + outputs: type=registry,registry.insecure=true - name: Image digest run: echo ${{ steps.meta.outputs.tags }}