From 71321e58781b7dca6d7e92cebd9af813259ff94f Mon Sep 17 00:00:00 2001 From: "Billy D." Date: Thu, 19 Feb 2026 06:45:20 -0500 Subject: [PATCH] fix: use docker/login-action for both registries to fix buildx auth - Docker Hub login now happens before Gitea login, both via login-action - Previous manual config.json write was clobbering Docker Hub auth - buildx docker-container driver inherits auth from login-action correctly - Fixes 429 Too Many Requests from unauthenticated Docker Hub pulls --- .gitea/workflows/ci.yml | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 43ffb3f..15698e8 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -91,13 +91,6 @@ jobs: http = true insecure = true - - name: Login to Docker Hub - if: vars.DOCKERHUB_USERNAME != '' - uses: docker/login-action@v3 - with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Configure Docker for insecure registry run: | sudo mkdir -p /etc/docker @@ -105,20 +98,19 @@ jobs: sudo systemctl restart docker || sudo service docker restart || true sleep 2 + - name: Login to Docker Hub + if: vars.DOCKERHUB_USERNAME != '' + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to Gitea Registry - run: | - AUTH=$(echo -n "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_TOKEN }}" | base64 -w0) - mkdir -p ~/.docker - cat > ~/.docker/config.json << EOF - { - "auths": { - "${{ env.REGISTRY_HOST }}": { - "auth": "$AUTH" - } - } - } - EOF - echo "Auth configured for ${{ env.REGISTRY_HOST }}" + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} - name: Extract metadata id: meta