http2pic/.gitea/workflows/build-docker.yml
Chris 543e44abc8
All checks were successful
Build Container / docker (push) Successful in 1m6s
fine, I'll do it myself
2025-06-10 11:09:14 +02:00

49 lines
1.2 KiB
YAML
Executable File

name: Build Container
run-name: ${{ gitea.actor }} is pushing
on:
push:
tags:
- "v*.*.*"
env:
REGISTRY: gitea.haschek.at
IMAGE_NAME: ${{ gitea.repository }}
jobs:
docker:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 Building ${{ gitea.repository }} because of a ${{ gitea.event_name }} event."
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.BUILD_TOKEN}}
- name: Build
uses: docker/build-push-action@v3
env:
ACTIONS_RUNTIME_TOKEN: ''
with:
context: .
file: docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}