Skip to content

rename proto service #117

rename proto service

rename proto service #117

Workflow file for this run

name: CD
on:
push:
env:
IMAGE: "ghcr.io/team-base64/edu-crm-tg-bots-app"
CONTAINER: "tg"
SQL_SRC: "tg-bots-sql"
DATA_FILE: "*-data"
CONTAINER_DB: "tgdb"
permissions:
contents: read
packages: write
jobs:
build:
if: contains(github.event.head_commit.message, '[DEPLOY]')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.IMAGE }}:latest
deploy:
needs: build
if: contains(github.event.head_commit.message, '[DEPLOY]')
runs-on: ubuntu-22.04
steps:
- uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
script_stop: true
script: |
cd ${{ secrets.TARGET_DOCKER_COMPOSE }}
docker compose stop
docker compose pull ${{ env.CONTAINER }}
docker compose create ${{ env.CONTAINER }}
docker compose start
docker system prune -af --volumes