github workflow

This commit is contained in:
Den Piligrim
2026-02-03 12:45:32 +03:00
parent eb21838ce6
commit 653896ae56
3 changed files with 78 additions and 59 deletions
+42
View File
@@ -0,0 +1,42 @@
name: Docker Build & Publish
on:
push:
branches: [ "main", "dp-gui" ]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Server image
uses: docker/build-push-action@v5
with:
context: ./server
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-server:${{ github.ref_name }}
- name: Build and push Client image
uses: docker/build-push-action@v5
with:
context: ./client
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-client:${{ github.ref_name }}