-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (38 loc) · 1.18 KB
/
code-quality.yml
File metadata and controls
39 lines (38 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Code Lint and Docker Build
on: [pull_request]
jobs:
quality:
runs-on: ubuntu-latest
name: Code check
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Linting with Pylint
run: |
pylint src/ --disable="C0103, C0114, C0115, C0116, E0401, R0402, R0801, R0902, R0903, R0913, R0914, R0915, R1725, R1728"
docker:
needs: quality
runs-on: ubuntu-latest
name: Build and Push Docker images
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: andreaschandra/sunflow:latest
build-args: WANDB_API_KEY=${{ secrets.WANDB_API_KEY }}