Update .gitea/workflows/docker-build.yaml
Publish Docker image / Build and Push Docker image (release) Successful in 1m30s

This commit is contained in:
2026-07-11 18:01:57 +02:00 Unverified
parent 414dbce989
commit d77905844f
+14 -15
View File
@@ -1,40 +1,39 @@
name: Build & Push Docker Image name: Publish Docker image
on: on:
release: release:
types: [published] types: [published]
env:
REGISTRY: git.stws.cc
IMAGE_NAME: ${{ github.repository }}
jobs: jobs:
build-and-push: push_to_registry:
name: Build and Push Docker name: Build and Push Docker image
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps: steps:
- name: Checkout repository - name: Check out the repo
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: git.stws.cc
username: ${{ github.repository_owner }} username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels)
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: git.stws.cc/${{ github.repository }}
tags: | tags: |
type=ref,event=tag type=ref,event=tag
type=raw,value=latest type=raw,value=latest
- name: Build and push Docker image - name: Build and push Docker images
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true