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

doc: update example to use yaml syntax #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ A GitHub action that runs [black code formatter](https://github.com/ambv/black)

## Example Workflow

```workflow
workflow "Example Workflow" {
on = "push"
resolves = ["Lint"]
}
```yaml
name: Code Quality Checks

action "Lint" {
uses = "lgeiger/black-action@master"
args = ". --check"
}
on: [push]

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be set to actions/checkout@v2

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, but I think it's more beneficial for the users of this action to get this PR merged as it is than to wait for the author to change this single character first...

- name: Run Black
uses: lgeiger/black-action@master
with:
args: --check src/ tests/
```

For a full list of possible `args` checkout the [black docs](https://github.com/ambv/black#command-line-options).