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

37 lines
993 B
YAML
Raw Normal View History

name: Build and push image
on:
push:
branches:
- master
jobs:
build-and-push:
# Needs docker-in-docker: the runner's job container must have access to
# a docker socket (e.g. act_runner configured with
# -v /var/run/docker.sock:/var/run/docker.sock) for buildx to work.
runs-on: docker
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 }}