Skip to content

Commit

Permalink
Add GitHub Actions Integration section (#360)
Browse files Browse the repository at this point in the history
Add a section describing a sample GitHub Actions workflow setup for Pronto.
  • Loading branch information
gyfis authored and doomspork committed Oct 16, 2019
1 parent 3b2ea45 commit b5eb4d7
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,30 @@ formatters = [formatter, status_formatter]
Pronto.run('origin/master', '.', formatters)
```

#### GitHub Actions Integration

You can also run Pronto as a GitHub action.

Here's an example `.github/workflows/pronto.yml` workflow file using the `github_status` and `github_pr` formatters and running on each GitHub PR, with `pronto-rubocop` as the runner:

```yml
name: Pronto
on: [pull_request]

jobs:
pronto:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- run: gem install pronto pronto-rubocop
- run: PRONTO_PULL_REQUEST_ID="$(jq --raw-output .number "$GITHUB_EVENT_PATH")" PRONTO_GITHUB_ACCESS_TOKEN="${{ secrets.GITHUB_TOKEN }}" pronto run -f github_status github_pr -c origin/master
```
### GitLab Integration
You can run Pronto as a step of your CI builds and get the results as comments
Expand Down

0 comments on commit b5eb4d7

Please sign in to comment.