Skip to content

easy

easy #977

Workflow file for this run

name: Docker Prod
on:
workflow_dispatch:
push:
branches: [master]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Create env file
run: |
touch .env
echo TOKEN=${{ secrets.TOKEN }} >> .env
echo POSTGRES_USER=${{ secrets.POSTGRES_USER }} >> .env
echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env
echo POSTGRES_HOST=${{ secrets.POSTGRES_HOST }} >> .env
echo POSTGRES_DB=${{ secrets.POSTGRES_DB }} >> .env
echo OPEN_AI=${{ secrets.OPEN_AI }} >> .env
echo DEEPL=${{ secrets.DEEPL }} >> .env
echo HELPER_ROLES=${{ secrets.HELPER_ROLES }} >> .env
echo STATUS_ROLES=${{ secrets.STATUS_ROLES }} >> .env
echo MEMBER_ROLES=${{ secrets.MEMBER_ROLES }} >> .env
echo LEVEL_ROLES=${{ secrets.LEVEL_ROLES }} >> .env
echo GENERAL_CHANNELS=${{ secrets.GENERAL_CHANNELS }} >> .env
echo VERIFY_CHANNELS=${{ secrets.VERIFY_CHANNELS }} >> .env
echo BOT_CHANNELS=${{ secrets.BOT_CHANNELS }} >> .env
echo VOICE_EVENT_CHANNELS=${{ secrets.VOICE_EVENT_CHANNELS }} >> .env
echo JOIN_EVENT_CHANNELS=${{ secrets.JOIN_EVENT_CHANNELS }} >> .env
echo MEMBERS_COUNT_CHANNELS=${{ secrets.MEMBERS_COUNT_CHANNELS }} >> .env
echo IS_CONSTRAINED_TO_BOT_CHANNEL=${{ secrets.IS_CONSTRAINED_TO_BOT_CHANNEL }} >> .env
echo SHOULD_LOG_VOICE_EVENTS=${{ secrets.SHOULD_LOG_VOICE_EVENTS }} >> .env
echo SHOULD_COUNT_MEMBERS=${{ secrets.SHOULD_COUNT_MEMBERS }} >> .env
echo SHOULD_USER_LEVEL_UP=${{ secrets.SHOULD_USER_LEVEL_UP }} >> .env
echo BOT_ICON=${{ secrets.BOT_ICON }} >> .env
cat .env
- name: Docker run
run: docker compose up -d --force-recreate --build
- name: remove unused images, containers, volumes, and networks
run: docker image prune -a -f --filter "until=24h" && docker container prune -f --filter "until=24h" && docker volume prune -f && docker network prune -f --filter "until=24h"