diff --git a/README.md b/README.md index 651cf48..d1d7fb7 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,26 @@ versions available. Each version of the Fourmolu Action generally has a corresponding version of `fourmolu`. Make sure you pick a Fourmolu Action version that uses the version of `fourmolu` you use locally. +### Full Example + +Here's a full YAML file you can copy and paste into your repo that runs +`fourmolu-action`. Add this as a file like `.github/workflows/fourmolu.yaml`. +This Workflow will run everytime you push to a branch. + +```yaml +name: fourmolu +on: push +jobs: + format: + runs-on: ubuntu-latest + steps: + # Note that you must checkout your code before running fourmolu/fourmolu-action + - uses: actions/checkout@v2 + - uses: fourmolu/fourmolu-action@v1 +``` + +### Example with more Options + Here's a more complicated example that shows more options being used: ```yaml @@ -39,7 +59,7 @@ Here's a more complicated example that shows more options being used: extra-args: "--indent-wheres true" ``` -## Example Usage with Build Matrix +### Example Usage with Build Matrix If you are using a build matrix, then it is more efficient to have a separate job for checking of formatting: @@ -65,6 +85,9 @@ passes. The available options are defined in [`./action.yml`](./action.yml). See that file for more explanation. + + + ## Hacking on this repo In order to do development on this repo, you first need to install NodeJS and