updated ci
All checks were successful
Build and Push Docker Image / build-and-push (release) Successful in 48s

This commit is contained in:
2025-10-16 13:30:45 +03:00
parent 9d355a926e
commit e1bbf19387
6 changed files with 174 additions and 3 deletions

View File

@ -0,0 +1,49 @@
name: Build and Push Docker Image
on:
release:
types: [published]
env:
REGISTRY: git.frik.su
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Docker
run: curl -fsSL https://get.docker.com | sh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract Docker tags from release
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}