Update action #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: ["master"] | |
jobs: | |
docker: | |
runs-on: self-hosted | |
env: | |
TELEGRAM_BOT_SECRET_TRIBUNA: ${{ secrets.TELEGRAM_BOT_SECRET_TRIBUNA }} | |
CLUB_SERVICE_TOKEN_OUTLINE_BOT: ${{ secrets.CLUB_SERVICE_TOKEN_OUTLINE_BOT }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Update ENVs | |
run: | | |
source ~/.bashrc | |
- name: Delete old container and Image | |
run: | | |
docker stop tribuna_bot_django | |
docker rm tribuna_bot_django | |
docker rmi core-tribuna_bot | |
- name: Deploy to host | |
run: | | |
cd core | |
TELEGRAM_BOT_SECRET_TRIBUNA=$TELEGRAM_BOT_SECRET_TRIBUNA CLUB_SERVICE_TOKEN_OUTLINE_BOT=$CLUB_SERVICE_TOKEN_OUTLINE_BOT docker compose up -d |