puffin-app/.gitea/workflows/build-deploy.yml
Matt 5a2a1c47da
Some checks failed
Build and Push Docker Image / build (push) Failing after 2s
Replace actions/checkout with manual git clone
The docker:dind image doesn't include Node.js which is required
by actions/checkout@v4. Use manual git commands instead.

Changes:
- Install git via apk (Alpine package manager)
- Clone repository directly
- Checkout specific commit SHA

This approach works with docker:dind's minimal Alpine base.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 13:57:58 +01:00

40 lines
1.1 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker:24-dind
options: --privileged
steps:
- name: Checkout code
run: |
apk add --no-cache git
git clone https://code.puffinoffset.com/matt/puffin-app.git .
git checkout ${{ github.sha }}
- name: Log in to Gitea Container Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login code.puffinoffset.com -u ${{ github.actor }} --password-stdin
- name: Build Docker image
run: |
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