Files
backupbot/.gitea/workflows/build.yml
Chris Cowan 1b0631d4e8
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
test 2
2025-10-23 15:43:10 -07:00

37 lines
1.1 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
tags:
- "v*" # trigger on tags starting with "v"
jobs:
build:
runs-on: prodesk
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Docker Registry
uses: docker/login-action@v3
with:
registry: gitea.calahilstudios.com
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: >-
calahilstudios/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
calahilstudios/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && format('calahilstudios/{0}/{1}:{2}', github.repository_owner, github.event.repository.name, github.ref_name) }}