2026-09-18 15:03:43 +02:00
|
|
|
name: Build and push image
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- master
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build-and-push:
|
2026-09-18 15:38:02 +02:00
|
|
|
# Use the runner's default job image as-is: it's pre-configured with
|
|
|
|
|
# DOCKER_HOST pointing at the runner's dind sidecar (and privileged
|
|
|
|
|
# access). Overriding `container:` here loses that configuration.
|
2026-09-18 15:03:43 +02:00
|
|
|
runs-on: docker
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: Log in to Forgejo registry
|
2026-09-18 15:36:20 +02:00
|
|
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.rosenvold.tech -u "${{ github.actor }}" --password-stdin
|
2026-09-18 15:03:43 +02:00
|
|
|
|
2026-09-18 15:36:20 +02:00
|
|
|
- name: Build image
|
|
|
|
|
run: |
|
|
|
|
|
docker build \
|
|
|
|
|
-t git.rosenvold.tech/lucas/rosenvold-core:latest \
|
|
|
|
|
-t git.rosenvold.tech/lucas/rosenvold-core:${{ github.sha }} \
|
|
|
|
|
-f Containerfile .
|
2026-09-18 15:03:43 +02:00
|
|
|
|
2026-09-18 15:36:20 +02:00
|
|
|
- name: Push image
|
|
|
|
|
run: docker push git.rosenvold.tech/lucas/rosenvold-core --all-tags
|