fix: change ci/cd notification #20

Merged
redrockjs merged 1 commits from dev into main 2025-06-19 19:11:06 +00:00
Showing only changes of commit 1ec659dd85 - Show all commits

View File

@@ -9,30 +9,34 @@ jobs:
build:
runs-on: self-hosted
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: smallbuster/fire-exam:latest
- name: Notify Telegram start building
if: always()
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_CHAT_ID }}
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
message: |
🚀 Стадия сборки запущена!
🚀 Запуск сборки!
Сервер: ${{ secrets.SERVER_NAME }}
Репозиторий: ${{ github.repository }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: smallbuster/fire-exam:latest
- name: Notify Telegram about success
if: success()
uses: appleboy/telegram-action@master
@@ -64,6 +68,16 @@ jobs:
runs-on: self-hosted
needs: build
steps:
- name: Notify Telegram start deploy
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_CHAT_ID }}
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
message: |
🐳 Запуск деплоя!
Сервер: ${{ secrets.SERVER_NAME }}
Репозиторий: ${{ github.repository }}
- name: Checkout repository
uses: actions/checkout@v4
@@ -89,17 +103,6 @@ jobs:
run: |
docker compose -f docker-compose.yaml up -d
- name: Notify Telegram start building
if: always()
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_CHAT_ID }}
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
message: |
🐳 Стадия деплоя запущена!
Сервер: ${{ secrets.SERVER_NAME }}
Репозиторий: ${{ github.repository }}
- name: Notify Telegram about success
if: success()
uses: appleboy/telegram-action@master