rosenvold-core/.forgejo/workflows/build.yml

44 lines
1.1 KiB
YAML
Raw Normal View History

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 }}