Skip to content

Commit 5654f90

Browse files
committed
commit
0 parents  commit 5654f90

4 files changed

Lines changed: 35 additions & 0 deletions

File tree

DockerFile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.7-alpine
2+
3+
LABEL "com.github.actions.name"="creating error log using Flake8"
4+
LABEL "com.github.actions.description"="run flake8 command and use black"
5+
LABEL maintainer = "Vinayak Sharma <itssvinayak@gmail.com> "
6+
LABEL "com.github.actions.icon"="code"
7+
LABEL "repository"=""
8+
LABEL "homepage"=""
9+
10+
11+
RUN pip install --upgrade pip
12+
RUN pip install flake8
13+
RUN pip install black
14+
15+
COPY entrypoint.sh /
16+
RUN chmod +x /entrypoint.sh
17+
ENTRYPOINT ["/entrypoint.sh"]

action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: 'pylint-formate'
2+
description: 'Perform Style Checking on your Python 3 using flake8 and formate code using black'
3+
4+
runs:
5+
using: 'docker'
6+
image: 'Dockerfile'
7+
args:
8+
- ${{ inputs.filename }}

code.svg

Lines changed: 1 addition & 0 deletions
Loading

entrypoint.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
echo "Running style checks on ${inputs.filename}"
4+
flake8 ${inputs.filename} >> error.log
5+
6+
echo "formating ${inputs.filename}"
7+
black ${inputs.filename}
8+
9+
echo " Style checked and formated "

0 commit comments

Comments
 (0)