Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version to github action (and rewrite the whole thing while at it) #1940

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"'
ichard26 marked this conversation as resolved.
Show resolved Hide resolved
required: false
default: ""
branding:
color: "black"
icon: "check-circle"
runs:
using: "docker"
image: "action/Dockerfile"
using: composite
ichard26 marked this conversation as resolved.
Show resolved Hide resolved
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.