rosenvold-core/.forgejo/workflows/build.yml
Lucas Seidelin Rosenvold Christensen 340fc8ba57
Some checks failed
Build and push image / build-and-push (push) Failing after 14s
Fix pipeline: run build job in a container with docker CLI
The runner's default job image has no docker binary. Run the job in
docker:27-cli with a docker:27-dind sidecar service instead of relying
on the runner exposing a host docker socket.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 15:06:40 +02:00

43 lines
1.1 KiB
YAML

name: Build and push image
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: docker
# The default job image has no docker CLI, so run in an image that has
# one and talk to a sidecar dind daemon over the network instead of
# relying on the runner exposing a host docker socket.
container: docker:27-cli
services:
docker:
image: docker:27-dind
options: --privileged
env:
DOCKER_HOST: tcp://docker:2375
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to Forgejo registry
uses: docker/login-action@v3
with:
registry: git.rosenvold.tech
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Containerfile
push: true
tags: |
git.rosenvold.tech/lucas/rosenvold-core:latest
git.rosenvold.tech/lucas/rosenvold-core:${{ github.sha }}