add docker
test python / Python ${{ matrix.python-version }} sample (pypy3) (push) Failing after 5s Details
test python / Python ${{ matrix.python-version }} sample (3.12) (push) Has been cancelled Details

This commit is contained in:
sergey 2024-09-26 21:19:51 +03:00
parent f1ae964a3a
commit 4e3c9ec28a
2 changed files with 7 additions and 11 deletions

View File

@ -16,20 +16,11 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
architecture: x64 architecture: x64
- name: pip upgrade
- name: Print secret and variables
run: |
echo "TGBOT_CONFIG__TG__TOKEN: ${{ secrets.TGBOT_CONFIG__TG__TOKEN }}"
echo "TGBOT_CONFIG__ZBX__TOKEN: ${{ secrets.TGBOT_CONFIG__ZBX__TOKEN }}"
echo "TGBOT_CONFIG__ZBX__URL: ${{ secrets.TGBOT_CONFIG__ZBX__URL }}"
echo "qwe: ${{ vars.QWE }}"
- name: pip uprade
run: python -m pip install --upgrade pip run: python -m pip install --upgrade pip
- name: install requirements - name: install requirements
run: pip install -r requirements.txt run: pip install -r requirements.txt
- name: start - name: start bot
env: env:
TGBOT_CONFIG__TG__TOKEN: ${{ secrets.TGBOT_CONFIG__TG__TOKEN }} TGBOT_CONFIG__TG__TOKEN: ${{ secrets.TGBOT_CONFIG__TG__TOKEN }}
TGBOT_CONFIG__ZBX__TOKEN: ${{ secrets.TGBOT_CONFIG__ZBX__TOKEN }} TGBOT_CONFIG__ZBX__TOKEN: ${{ secrets.TGBOT_CONFIG__ZBX__TOKEN }}

5
Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM python:3.12
ADD tg-bot-app ./tg-bot-app
ADD requirements.txt /requirements.txt
RUN pip install -r requirements.txt --root-user-action=ignore
CMD ["python", "tg-bot-app/main.py"]