Files
mta-sign/.gitea/workflows/build.yml
Lucas Oskorep 4baf27ca1a
All checks were successful
Build and Push Docker Image / build (push) Successful in 47s
feat: gitea debugging
2026-01-20 23:17:05 -05:00

64 lines
1.6 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
env:
IMAGE_NAME: pi-mta-sign
jobs:
build:
runs-on: archlinux
container:
image: docker:cli
steps:
- name: Install dependencies
run: |
apk add --no-cache nodejs npm git
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Log in to Container Registry
if: gitea.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: gitea.chaosdev.gay
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: gitea.chaosdev.gay/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: ${{ gitea.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}