Workflow #6

Merged
rudi merged 2 commits from workflow into main 2026-08-28 13:45:39 +00:00
Showing only changes of commit a2c1477a09 - Show all commits
+41
View File
@@ -0,0 +1,41 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ gitea.server_url }}
username: ${{ gitea.actor }} # Nutzt den Namen des Pushers
password: ${{ secrets.GITEA_TOKEN }} # Oder ${{ gitea.token }}
- name: Extract Metadata (Tags/Labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ gitea.server_url }}/${{ gitea.repository }}
tags: |
type=raw,value=latest
type=ref,event=branch
type=semver,pattern={{version}}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}