All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 # GitHub Actions integration
3 You can use _Black_ within a GitHub Actions workflow without setting your own Python
4 environment. Great for enforcing that your code matches the _Black_ code style.
8 This action is known to support all GitHub-hosted runner OSes. In addition, only
9 published versions of _Black_ are supported (i.e. whatever is available on PyPI).
11 Finally, this action installs _Black_ with the `colorama` extra so the `--color` flag
16 Create a file named `.github/workflows/black.yml` inside your repository with:
21 on: [push, pull_request]
25 runs-on: ubuntu-latest
27 - uses: actions/checkout@v2
28 - uses: psf/black@stable
31 We recommend the use of the `@stable` tag, but per version tags also exist if you prefer
32 that. Note that the action's version you select is independent of the version of _Black_
35 The version of _Black_ the action will use can be configured via `version`. The action
36 defaults to the latest release available on PyPI. Only versions available from PyPI are
37 supported, so no commit SHAs or branch names.
39 You can also configure the arguments passed to _Black_ via `options` (defaults to
40 `'--check --diff'`) and `src` (default is `'.'`)
42 Here's an example configuration:
45 - uses: psf/black@stable
47 options: "--check --verbose"