From 56da114210f7ffafe5a147a1b9b781eda7226e46 Mon Sep 17 00:00:00 2001 From: poignatov Date: Tue, 3 Feb 2026 15:32:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=83=D0=B2=D0=B5=D0=B4=D0=BE=D0=BC=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20CI/CD=20=D1=81=20=D1=8D=D1=82=D0=B0=D0=BF?= =?UTF-8?q?=D0=BE=D0=BC=20=D0=A0=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build-and-push.yml | 35 ++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/build-and-push.yml b/.gitea/workflows/build-and-push.yml index bbb70cb..46d392c 100644 --- a/.gitea/workflows/build-and-push.yml +++ b/.gitea/workflows/build-and-push.yml @@ -61,6 +61,7 @@ jobs: echo "${{ secrets.GIT_TOKEN }}" | docker login dungeonsiege.synology.me -u ${{ secrets.GIT_USERNAME }} --password-stdin - name: Push Docker Image + id: push if: steps.version_check.outputs.changed == 'true' run: | REGISTRY="dungeonsiege.synology.me/poignatov/play-life" @@ -90,9 +91,11 @@ jobs: `${{ steps.version_check.outputs.commit_message }}` Сборка: ✅ + Регистрация: ⏭️ Публикация: ⏭️ - name: Deploy to Production Server + id: deploy if: steps.version_check.outputs.changed == 'true' uses: appleboy/ssh-action@master with: @@ -152,7 +155,7 @@ jobs: $DOCKER_COMPOSE_CMD -f docker-compose.prod.yml ps - name: Send Telegram notification (publish success) - if: success() && steps.version_check.outputs.changed == 'true' + if: steps.build.outcome == 'success' && steps.version_check.outputs.changed == 'true' && steps.push.outcome == 'success' && steps.deploy.outcome == 'success' uses: appleboy/telegram-action@master with: to: ${{ secrets.TELEGRAM_TO }} @@ -163,11 +166,26 @@ jobs: `${{ steps.version_check.outputs.commit_message }}` Сборка: ✅ + Регистрация: ✅ Публикация: ✅ - Деплой: ✅ + + - name: Send Telegram notification (push failure) + if: steps.build.outcome == 'success' && steps.version_check.outputs.changed == 'true' && steps.push.outcome == 'failure' + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} + format: markdown + message: | + *play-life* + `${{ steps.version_check.outputs.commit_message }}` + + Сборка: ✅ + Регистрация: ❌ + Публикация: ⏭️ - name: Send Telegram notification (deploy failure) - if: failure() && steps.version_check.outputs.changed == 'true' + if: steps.build.outcome == 'success' && steps.push.outcome == 'success' && steps.version_check.outputs.changed == 'true' && steps.deploy.outcome == 'failure' uses: appleboy/telegram-action@master with: to: ${{ secrets.TELEGRAM_TO }} @@ -178,11 +196,11 @@ jobs: `${{ steps.version_check.outputs.commit_message }}` Сборка: ✅ - Публикация: ✅ - Деплой: ❌ + Регистрация: ✅ + Публикация: ❌ - - name: Send Telegram notification (failure) - if: failure() + - name: Send Telegram notification (build failure) + if: steps.build.outcome == 'failure' uses: appleboy/telegram-action@master with: to: ${{ secrets.TELEGRAM_TO }} @@ -193,4 +211,5 @@ jobs: `${{ steps.version_check.outputs.commit_message }}` Сборка: ❌ - Публикация: ❌ \ No newline at end of file + Регистрация: ⏭️ + Публикация: ⏭️ \ No newline at end of file