4958480d6f
Build and Push Docker Image / build (push) Failing after 2s
The host runner's docker build was falling back to the legacy builder, which can't parse the BuildKit-only RUN --mount=type=cache syntax in the Dockerfile. Set DOCKER_BUILDKIT=1 to route the build through the daemon's integrated BuildKit engine. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31 lines
831 B
YAML
31 lines
831 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
# Runs on the forgerunner host: bundled Docker CLI + mounted /var/run/docker.sock.
|
|
runs-on: host
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: registry.alwisp.com
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and Push
|
|
env:
|
|
DOCKER_BUILDKIT: "1"
|
|
run: |
|
|
# gitea.repository is already "owner/repo" (e.g. jason/breedr).
|
|
IMAGE="registry.alwisp.com/${{ gitea.repository }}"
|
|
docker build -t "${IMAGE}:latest" .
|
|
docker push "${IMAGE}:latest"
|