Skip to content

Merged

Merged #91

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run Black
uses: jpetrucciani/black-check@master
Test:
needs: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Provision System
run: ./bin/provision-system.sh
shell: bash
- name: PyTest
run: pipenv run pytest
shell: bash
Publish:
needs: Test
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Get Current Branch Name
uses: nelonoel/branch-name@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: jokeswar/vmchecker_api:${{ env.BRANCH_NAME }}