Some checks failed
Build and push image / build-and-push (push) Failing after 1m29s
The Forgejo runner infra now gives job containers a privileged container pre-wired to its own dind sidecar via DOCKER_HOST, so defining our own docker:dind service would start a conflicting second daemon. Keep the node image + docker CLI install (still needed) and drop the services/env block. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
50 lines
1.8 KiB
YAML
50 lines
1.8 KiB
YAML
name: Build and push image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: docker
|
|
# actions/checkout & co. are JS actions and need Node, so the job
|
|
# container has to be a Node image (not a bare docker CLI image). The
|
|
# runner already provides a privileged container wired up to its own
|
|
# dind sidecar via DOCKER_HOST, so we just need the docker CLI itself.
|
|
container: node:20-bookworm
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Docker CLI
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends ca-certificates curl
|
|
install -m 0755 -d /etc/apt/keyrings
|
|
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
|
chmod a+r /etc/apt/keyrings/docker.asc
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo $VERSION_CODENAME) stable" \
|
|
> /etc/apt/sources.list.d/docker.list
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends docker-ce-cli docker-buildx-plugin
|
|
|
|
- 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 }}
|