From 6d536503526adfd86981b417568256a8ab8ed30f Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 29 Oct 2025 13:53:34 +0100 Subject: [PATCH] Switch to Docker-based workflow with CLI commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace Kaniko approach with direct Docker CLI commands. The Gitea runner mounts Docker socket, making Docker available in ubuntu-latest environment. Key changes: - Remove container specification (Kaniko lacks shell utilities) - Use docker login with password-stdin for authentication - Build with docker build using multiple -t tags - Push both latest and commit SHA tags - Works with Docker-based Gitea runners 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .gitea/workflows/build-deploy.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/build-deploy.yml b/.gitea/workflows/build-deploy.yml index a177fbc..30cede8 100644 --- a/.gitea/workflows/build-deploy.yml +++ b/.gitea/workflows/build-deploy.yml @@ -8,24 +8,26 @@ on: jobs: build: runs-on: ubuntu-latest - container: - image: gcr.io/kaniko-project/executor:debug steps: - name: Checkout code uses: actions/checkout@v4 - - name: Prepare Kaniko config + - name: Log in to Gitea Container Registry run: | - mkdir -p /kaniko/.docker - echo "{\"auths\":{\"code.puffinoffset.com\":{\"auth\":\"$(echo -n "${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}" | base64)\"}}}" > /kaniko/.docker/config.json + echo "${{ secrets.GITHUB_TOKEN }}" | docker login code.puffinoffset.com -u ${{ github.actor }} --password-stdin - - name: Build and push with Kaniko + - name: Build Docker image run: | - /kaniko/executor \ - --context=${{ github.workspace }} \ - --dockerfile=${{ github.workspace }}/Dockerfile \ - --destination=code.puffinoffset.com/matt/puffin-app:latest \ - --destination=code.puffinoffset.com/matt/puffin-app:main-${{ github.sha }} \ - --cache=true \ - --cache-repo=code.puffinoffset.com/matt/puffin-app/cache + docker build -t code.puffinoffset.com/matt/puffin-app:latest \ + -t code.puffinoffset.com/matt/puffin-app:main-${{ github.sha }} \ + . + + - name: Push Docker images + run: | + docker push code.puffinoffset.com/matt/puffin-app:latest + docker push code.puffinoffset.com/matt/puffin-app:main-${{ github.sha }} + + - name: Show image info + run: | + docker images | grep puffin-app