arigram/.github/workflows/main.yml
Ari Archer 4a1ef1bf8d
Fixed CI and MsgProxy.get() method
Signed-off-by: Ari Archer <truncateddinosour@gmail.com>
2022-02-17 00:42:21 +02:00

47 lines
1.3 KiB
YAML

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install tools
run: |
pip install poetry && poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi
- name: Check formatting and run linters
run: |
sh check.sh
#- name: build and deploy master image to ghcr.io
# # if: ${{ github.ref == 'refs/heads/master' }}
# env:
# PKG_TOKEN: ${{ secrets.PKG_TOKEN }}
# USERNAME: ${{ github.actor }}
# run: |
# git_hash=$(git rev-parse --short "$GITHUB_SHA")
# git_branch="$(echo ${GITHUB_REF} | cut -d'/' -f3)"
# echo ${PKG_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
# docker build -t ghcr.io/${USERNAME}/tg:${git_branch}-${git_hash} -t ghcr.io/${USERNAME}/tg:latest .
# docker push ghcr.io/${USERNAME}/tg:${git_branch}-${git_hash}
# docker push ghcr.io/${USERNAME}/tg:latest