-
Notifications
You must be signed in to change notification settings - Fork 15
43 lines (39 loc) · 1.12 KB
/
nayn_bot_dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Nyan Bot Dev
on:
push:
branches:
- dev
- '!*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 --dev
- name: Lint
run: pipenv run make lint
- name: Test with pytest
run: export PYTHONPATH=./bot && pipenv run pytest
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: vldc-hq/vldc-bot/bot_dev
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_DEV }}
run: |
curl --fail --insecure --max-time 300 "https://$DEPLOY_HOST/deploy/bot?secret=$DEPLOY_KEY"'&sync=true'