X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/4c9990023635ece68671324124801f6b75dab2a8..bfc013ab93d0993a6e24235291dddd4c4ecd64ee:/docs/integrations/github_actions.md diff --git a/docs/integrations/github_actions.md b/docs/integrations/github_actions.md index c9697cc..d77b969 100644 --- a/docs/integrations/github_actions.md +++ b/docs/integrations/github_actions.md @@ -32,9 +32,12 @@ We recommend the use of the `@stable` tag, but per version tags also exist if yo that. Note that the action's version you select is independent of the version of _Black_ the action will use. -The version of _Black_ the action will use can be configured via `version`. The action -defaults to the latest release available on PyPI. Only versions available from PyPI are -supported, so no commit SHAs or branch names. +The version of _Black_ the action will use can be configured via `version`. This can be +any +[valid version specifier](https://packaging.python.org/en/latest/glossary/#term-Version-Specifier) +or just the version number if you want an exact version. The action defaults to the +latest release available on PyPI. Only versions available from PyPI are supported, so no +commit SHAs or branch names. You can also configure the arguments passed to _Black_ via `options` (defaults to `'--check --diff'`) and `src` (default is `'.'`) @@ -48,3 +51,15 @@ Here's an example configuration: src: "./src" version: "21.5b1" ``` + +If you want to match versions covered by Black's +[stability policy](labels/stability-policy), you can use the compatible release operator +(`~=`): + +```yaml +- uses: psf/black@stable + with: + options: "--check --verbose" + src: "./src" + version: "~= 22.0" +```