Files
wedding/.github/workflows/docker-publish.yml
arrelin 6f43059b5f
All checks were successful
Build and Publish Images / build-and-push (push) Successful in 1m24s
asd
2026-03-06 15:39:16 +03:00

37 lines
1.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Build and Publish Images
on:
push:
branches: [ main, master ]
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Gitea Registry
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login 192.168.31.100:3847 -u ${{ secrets.REGISTRY_USER }} --password-stdin
- name: Build and push backend image
run: |
docker build -t 192.168.31.100:3847/arrelin/wedding-backend:latest -t 192.168.31.100:3847/arrelin/wedding-backend:${{ gitea.sha }} ./backend
docker push 192.168.31.100:3847/arrelin/wedding-backend:latest
docker push 192.168.31.100:3847/arrelin/wedding-backend:${{ gitea.sha }}
- name: Build and push frontend image
run: |
docker build -t 192.168.31.100:3847/arrelin/wedding-frontend:latest -t 192.168.31.100:3847/arrelin/wedding-frontend:${{ gitea.sha }} ./frontend
docker push 192.168.31.100:3847/arrelin/wedding-frontend:latest
docker push 192.168.31.100:3847/arrelin/wedding-frontend:${{ gitea.sha }}
- name: Logout
run: docker logout 192.168.31.100:3847
# - name: Trigger Coolify redeploy
# run: |
# curl -s -H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}" \
# "http://192.168.31.100:8000/api/v1/deploy?uuid=ВСТАВЬ_UUID_СЮДА&force=true"