Skip to content

Merge pull request #17 from fireindark707/patch-3 #15

Merge pull request #17 from fireindark707/patch-3

Merge pull request #17 from fireindark707/patch-3 #15

name: Build and Publish
on:
push:
env:
IMAGE_NAME: polybot
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run tests
run: |
pip install wheel
pip install -r ./dev-requirements.txt
black --check ./polybot
flake8 ./polybot
mypy ./polybot --ignore-missing-imports
build:
runs-on: ubuntu-22.04
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
steps:
- uses: actions/checkout@v3
- name: Login to container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push production container
uses: docker/build-push-action@v4
with:
push: true
tags: ghcr.io/russss/polybot:latest