From 1ec659dd8526c4ffbfb6074b6e4ff799fdbdb2f3 Mon Sep 17 00:00:00 2001 From: RedRock Date: Thu, 19 Jun 2025 22:10:20 +0300 Subject: [PATCH] fix: change ci/cd notification --- .github/workflows/main.yaml | 57 +++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6728cd4..fb40c55 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -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 -- 2.49.1