Merge pull request #20 from redrockjs/dev
fix: change ci/cd notification
This commit was merged in pull request #20.
This commit is contained in:
57
.github/workflows/main.yaml
vendored
57
.github/workflows/main.yaml
vendored
@@ -9,30 +9,34 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
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
|
- name: Notify Telegram start building
|
||||||
if: always()
|
|
||||||
uses: appleboy/telegram-action@master
|
uses: appleboy/telegram-action@master
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_CHAT_ID }}
|
to: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||||
message: |
|
message: |
|
||||||
🚀 Стадия сборки запущена!
|
🚀 Запуск сборки!
|
||||||
Сервер: ${{ secrets.SERVER_NAME }}
|
Сервер: ${{ secrets.SERVER_NAME }}
|
||||||
Репозиторий: ${{ github.repository }}
|
Репозиторий: ${{ 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
|
- name: Notify Telegram about success
|
||||||
if: success()
|
if: success()
|
||||||
uses: appleboy/telegram-action@master
|
uses: appleboy/telegram-action@master
|
||||||
@@ -64,6 +68,16 @@ jobs:
|
|||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
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
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -89,17 +103,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker compose -f docker-compose.yaml up -d
|
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
|
- name: Notify Telegram about success
|
||||||
if: success()
|
if: success()
|
||||||
uses: appleboy/telegram-action@master
|
uses: appleboy/telegram-action@master
|
||||||
|
|||||||
Reference in New Issue
Block a user