Skip to content

Commit

Permalink
documentation: usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
MorrisonCole authored Nov 26, 2019
1 parent 22902ea commit 8a7ff9d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

A GitHub Action to ensure that your PR title matches a given regex.

## Usage

Create a workflow definition at `.github/workflows/<my-workflow>.yml` with something like the following contents:

```yaml
name: PR Lint

on:
pull_request:
types: [opened, edited, reopened]

jobs:
pr-lint:
runs-on: ubuntu-latest
steps:
- uses: morrisoncole/[email protected]
with:
title-regex: "#EX-[0-9]+"
on-failed-regex-comment: "This is just an example. Failed regex: `%regex%`!"
repo-token: "${{ secrets.GITHUB_TOKEN }}"

```

## Related Reading

* [GitHub Action Metadata Syntax](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions)

0 comments on commit 8a7ff9d

Please sign in to comment.