build reload image

This commit is contained in:
kittapath-Jool 2025-09-15 16:34:36 +07:00
parent 9d5145806f
commit 6b585ac193

View file

@ -4,20 +4,13 @@ on:
push: push:
tags: tags:
- "reportv1-[0-9]+.[0-9]+.[0-9]+" - "reportv1-[0-9]+.[0-9]+.[0-9]+"
# push:
# tags:
# - 'v[0-9]+.[0-9]+.[0-9]+'
# tags-ignore:
# - '2.*'
# Allow run workflow manually from Action tab
workflow_dispatch: workflow_dispatch:
env: env:
REGISTRY: docker.frappet.com REGISTRY: docker.frappet.com
IMAGE_NAME: ehr/bma-ehr-report-service IMAGE_NAME: ehr/bma-ehr-report-service
DEPLOY_HOST: frappet.com DEPLOY_HOST: frappet.com
DEPLOY_PORT: 10102 DEPLOY_PORT: 10102
COMPOSE_PATH: /home/frappet/docker/bma-ehr COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-report
# COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-report
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
jobs: jobs:
@ -74,40 +67,40 @@ jobs:
docker compose pull docker compose pull
docker compose up -d docker compose up -d
echo "${{ steps.gen_ver.outputs.image_ver }}"> success echo "${{ steps.gen_ver.outputs.image_ver }}"> success
# - name: Notify Discord Success - name: Notify Discord Success
# if: success() if: success()
# run: | run: |
# curl -H "Content-Type: application/json" \ curl -H "Content-Type: application/json" \
# -X POST \ -X POST \
# -d '{ -d '{
# "embeds": [{ "embeds": [{
# "title": "✅ Deployment Success!", "title": "✅ Deployment Success!",
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`", "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
# "color": 3066993, "color": 3066993,
# "footer": { "footer": {
# "text": "Release Notification", "text": "Release Notification",
# "icon_url": "https://example.com/success-icon.png" "icon_url": "https://example.com/success-icon.png"
# }, },
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
# }] }]
# }' \ }' \
# ${{ secrets.DISCORD_WEBHOOK }} ${{ secrets.DISCORD_WEBHOOK }}
# - name: Notify Discord Failure - name: Notify Discord Failure
# if: failure() if: failure()
# run: | run: |
# curl -H "Content-Type: application/json" \ curl -H "Content-Type: application/json" \
# -X POST \ -X POST \
# -d '{ -d '{
# "embeds": [{ "embeds": [{
# "title": "❌ Deployment Failed!", "title": "❌ Deployment Failed!",
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`", "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
# "color": 15158332, "color": 15158332,
# "footer": { "footer": {
# "text": "Release Notification", "text": "Release Notification",
# "icon_url": "https://example.com/failure-icon.png" "icon_url": "https://example.com/failure-icon.png"
# }, },
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
# }] }]
# }' \ }' \
# ${{ secrets.DISCORD_WEBHOOK }} ${{ secrets.DISCORD_WEBHOOK }}