From ecc8faa2f848f6d0ece2e4a6519ec687e8085b76 Mon Sep 17 00:00:00 2001 From: Youri op 't Roodt Date: Mon, 12 Jul 2021 14:13:19 +0200 Subject: [PATCH] Update README.md and print version used --- README.md | 35 +++++++++++++++++++++++------------ entrypoint.sh | 1 + 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c2033a6..ee0f251 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,29 @@ A GitHub action that runs [black code formatter](https://github.com/ambv/black) for Python. -## Example Workflow - -```workflow -workflow "Example Workflow" { - on = "push" - resolves = ["Lint"] -} - -action "Lint" { - uses = "lgeiger/black-action@master" - args = ". --check" -} +## Example action + +``` +name: Build + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + with: + lfs: false + - name: Black Code Formatter + uses: tripactions/black-code-formatter@21.4b1 + with: + args: ". --check -l 100 -t py37" + ``` For a full list of possible `args` checkout the [black docs](https://github.com/ambv/black#command-line-options). + +Based on the original [lgeiger/black-action](https://github.com/lgeiger/black-action). \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 210664a..be85e1b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,3 +1,4 @@ #!/bin/sh set -e +sh -c "black --version" sh -c "black $*"