Skip to content

Commit f164580

Browse files
Revert "feat: swapped from Docker to composite"
This reverts commit d821628, reversing changes made to 184c91c.
1 parent af006e1 commit f164580

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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"]

action.yml

+2-14
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@ branding:
66
icon: 'check-circle'
77
color: 'green'
88

9-
inputs:
10-
source-dir:
11-
description: 'The folder containing the source files to format'
12-
required: true
13-
default: './'
14-
159
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'

entrypoint.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
set -e
3+
echo "Checking formatting for $GITHUB_REPOSITORY"
4+
sh -c "yapf --diff --recursive $GITHUB_WORKSPACE $*"

0 commit comments

Comments
 (0)