Files
backupbot/.gitea/workflows/build.yml
Chris Cowan c1a7ffd9e8
All checks were successful
Build and Push Docker Image / build (push) Successful in 45s
try 4
2025-10-23 17:24:45 -07:00

47 lines
1.2 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
tags:
- "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: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: gitea.calahilstudios.com/${{ github.repository_owner }}/${{ github.event.repository.name }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}