Skip to content

Commit

Permalink
Add black_version to github action
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanfoulis committed Apr 6, 2021
1 parent e114ef5 commit 55a46b8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Expand Up @@ -45,6 +45,8 @@
- PR #2053: Python 2 support is now optional, install with
`python3 -m pip install black[python2]` to maintain support.

- allow choosing black version with github action (#1940)

#### _Packaging_

- Self-contained native _Black_ binaries are now provided for releases via GitHub
Expand Down
15 changes: 13 additions & 2 deletions action.yml
Expand Up @@ -6,9 +6,20 @@ inputs:
description: "Black input arguments."
required: false
default: ""
black_version:
description: 'Version of black to use. E.g "==20.8b1"'
required: false
default: ""
branding:
color: "black"
icon: "check-circle"
runs:
using: "docker"
image: "action/Dockerfile"
using: composite
steps:
- run: pip install --upgrade --no-cache-dir black${{inputs.black_version}}
shell: bash
- id: run-black
run:
${{ github.action_path }}/action/entrypoint.sh ${{ inputs.configuration }} ${{
inputs.sortPaths }}
shell: bash
10 changes: 0 additions & 10 deletions action/Dockerfile

This file was deleted.

0 comments on commit 55a46b8

Please sign in to comment.