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 }}