Skip to content

Commit

Permalink
Update README with better example
Browse files Browse the repository at this point in the history
  • Loading branch information
abatilo committed May 30, 2019
1 parent 8159524 commit 771dffd
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions README.md
Expand Up @@ -16,16 +16,41 @@ GitHub Actions for Python projects using poetry
### Create `main.workflow`

```hcl
workflow "Python workflow" {
workflow "Publish Python package" {
on = "push"
resolves = ["publish"]
}
action "Install" {
uses = "abatilo/actions-poetry@3.7.3"
args = ["install"]
}
action "Run black" {
needs = "Install"
uses = "abatilo/actions-poetry@3.7.3"
args = ["run", "python", "-m", "black", "--check", "."]
}
action "Run pylint" {
needs = "Install"
uses = "abatilo/actions-poetry@3.7.3"
args = ["run", "python", "-m", "pylint", "src"]
}
action "Master branch" {
needs = ["Run pylint", "Run black"]
uses = "actions/bin/filter@master"
args = "branch master"
}
action "publish" {
needs = "poetry-build"
needs = "Master branch"
uses = "abatilo/actions-poetry@3.7.3"
secrets = ["PYPI_USERNAME", "PYPI_PASSWORD"]
args = ["publish", "--build", "--no-interaction", "-vv", "--username", "$PYPI_USERNAME", "--password", "$PYPI_PASSWORD"]
}
```

## License
Expand Down

0 comments on commit 771dffd

Please sign in to comment.