-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- change to working directory - install `pip-requirements-parser` in a separate step - include Darker exit code in outputs - include Darker standard output in outputs - run `commit-range` action locally
- Loading branch information
Showing
2 changed files
with
67 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,19 @@ inputs: | |
Example: flake8,pylint==2.13.1 | ||
required: false | ||
default: '' | ||
working-directory: | ||
description: >- | ||
Directory to run Darker in, either absolute or relative to | ||
$GITHUB_WORKSPACE. By default, Darker is run in $GITHUB_WORKSPACE. | ||
required: false | ||
default: '.' | ||
outputs: | ||
exitcode: | ||
description: "Exit code of Darker" | ||
value: ${{ steps.darker.outputs.exitcode }} | ||
stdout: | ||
description: "Standard output of Darker" | ||
value: ${{ steps.darker.outputs.stdout }} | ||
branding: | ||
color: "black" | ||
icon: "check-circle" | ||
|
@@ -37,8 +50,13 @@ runs: | |
steps: | ||
- name: Commit Range | ||
id: commit-range | ||
uses: akaihola/darker/.github/actions/[email protected] | ||
uses: ./.github/actions/commit-range | ||
- name: Install dependencies | ||
run: | | ||
pip install pip-requirements-parser | ||
shell: bash | ||
- name: Run Darker | ||
id: darker | ||
run: | | ||
# Exists since using github.action_path + path to main script doesn't | ||
# work because bash interprets the backslashes in github.action_path | ||
|
@@ -56,7 +74,6 @@ runs: | |
sys.exit(proc.returncode) | ||
" | ||
pip install pip-requirements-parser | ||
if [ "$RUNNER_OS" == "Windows" ]; then | ||
echo $entrypoint | python | ||
else | ||
|
@@ -71,5 +88,6 @@ runs: | |
INPUT_REVISION: ${{ inputs.revision }} | ||
INPUT_LINT: ${{ inputs.lint }} | ||
INPUT_COMMIT_RANGE: ${{ steps.commit-range.outputs.commit-range }} | ||
INPUT_WORKING_DIRECTORY: ${{ inputs.working-directory }} | ||
pythonioencoding: utf-8 | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters