Merge pull request #74 from Pho3nix-Jacki3/master #46
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Apps For Errors And Build Docker Images | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
jhdbot-check: | |
name: Check JHDBot For Errors | |
runs-on: ubuntu-latest | |
env: | |
working-dir: ./JHDBot | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pylint | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
working-directory: ${{ env.working-dir }} | |
- name: Check errors with flake8 | |
run: | | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
working-directory: ${{ env.working-dir }} | |
jhd-bot-docker: | |
name: Build and push JHDBot | |
needs: jhdbot-check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v2 | |
- name: Setup QEMU For Docker Buildx | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: JHDBot | |
platforms: linux/amd64,linux/arm/v7 | |
file: ./JHDBot/Dockerfile | |
push: true | |
tags: jhdiscord/jhd-bot-docker:latest |