File tree 3 files changed +22
-14
lines changed
3 files changed +22
-14
lines changed Original file line number Diff line number Diff line change
1
+ FROM python:3
2
+
3
+ LABEL "com.github.actions.name" ="YAPF Python Code Formatting Check"
4
+ LABEL "com.github.actions.description" ="Run YAPF to check that your python code if correctly formatted."
5
+ LABEL "com.github.actions.icon" ="check-circle"
6
+ LABEL "com.github.actions.color" ="106a4e"
7
+ LABEL "repository" ="https://github.com/AlexanderMelde/yapf-action"
8
+ LABEL "homepage" ="https://github.com/AlexanderMelde/yapf-action"
9
+ LABEL "maintainer" =
"Alexander Melde <[email protected] >"
10
+
11
+ RUN pip install --upgrade pip
12
+ RUN pip install yapf
13
+
14
+ COPY entrypoint.sh /entrypoint.sh
15
+
16
+ ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -6,18 +6,6 @@ branding:
6
6
icon : ' check-circle'
7
7
color : ' green'
8
8
9
- inputs :
10
- source-dir :
11
- description : ' The folder containing the source files to format'
12
- required : true
13
- default : ' ./'
14
-
15
9
runs :
16
- using : ' composite'
17
- steps :
18
- - id : install-yapf
19
- run : pip install yapf
20
- shell : bash
21
- - id : invoke-yapf
22
- run : yapf --diff --recursive ${{ inputs.source-dir }} $*
23
- shell : bash
10
+ using : ' docker'
11
+ image : ' Dockerfile'
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -e
3
+ echo " Checking formatting for $GITHUB_REPOSITORY "
4
+ sh -c " yapf --diff --recursive $GITHUB_WORKSPACE $* "
You can’t perform that action at this time.
0 commit comments