Skip to content

Merge pull request #308 from C-Pro/feature/pirozhki #225

Merge pull request #308 from C-Pro/feature/pirozhki

Merge pull request #308 from C-Pro/feature/pirozhki #225

Workflow file for this run

name: Nyan Bot
on:
push:
branches:
- master
- '!*no-ci*'
- '!*skip-ci*'
tags:
- 'v*'
- '!*no-ci*'
- '!*skip-ci*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv==2022.9.24
pipenv install --system --dev
- name: Lint
run: make lint
- name: Test with pytest
run: export PYTHONPATH=./bot && pytest
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: vldc-hq/vldc-bot/bot
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
dockerfile: compose/prod/Dockerfile
- name: Trigger deploy
env:
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY_PROD }}
run: |
curl --fail --insecure --max-time 300 "https://$DEPLOY_HOST/deploy/bot-prod?secret=$DEPLOY_KEY"'&sync=true'