]> git.madduck.net Git - etc/vim.git/blobdiff - docs/integrations/github_actions.md

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Update CHANGES.md for 21.6b0 release (#2325)
[etc/vim.git] / docs / integrations / github_actions.md
index 9e8cf436453c93e82f29636a59c568163d9b6e4b..d293c40dadf35bb37130c0e3d984e1147d98986b 100644 (file)
@@ -3,6 +3,14 @@
 You can use _Black_ within a GitHub Actions workflow without setting your own Python
 environment. Great for enforcing that your code matches the _Black_ code style.
 
 You can use _Black_ within a GitHub Actions workflow without setting your own Python
 environment. Great for enforcing that your code matches the _Black_ code style.
 
+## Compatiblity
+
+This action is known to support all GitHub-hosted runner OSes. In addition, only
+published versions of _Black_ are supported (i.e. whatever is available on PyPI).
+
+Finally, this action installs _Black_ with both the `colorama` and `python2` extras so
+the `--color` flag and formatting Python 2 code are supported.
+
 ## Usage
 
 Create a file named `.github/workflows/black.yml` inside your repository with:
 ## Usage
 
 Create a file named `.github/workflows/black.yml` inside your repository with:
@@ -17,19 +25,26 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v2
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v2
-      - uses: actions/setup-python@v2
       - uses: psf/black@stable
 ```
 
 We recommend the use of the `@stable` tag, but per version tags also exist if you prefer
       - uses: psf/black@stable
 ```
 
 We recommend the use of the `@stable` tag, but per version tags also exist if you prefer
-that.
+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.
+
+You can also configure the arguments passed to _Black_ via `options` (defaults to
+`'--check --diff'`) and `src` (default is `'.'`)
 
 
-You may use `options` (Default is `'--check --diff'`) and `src` (Default is `'.'`) as
-follows:
+Here's an example configuration:
 
 ```yaml
 - uses: psf/black@stable
   with:
     options: "--check --verbose"
     src: "./src"
 
 ```yaml
 - uses: psf/black@stable
   with:
     options: "--check --verbose"
     src: "./src"
+    version: "21.5b1"
 ```
 ```