Skip to content

Commit 38eb1c8

Browse files
authored
Merge pull request #6 from fourmolu/full-example
Add a full example yaml file to the README for easy copy-pasting
2 parents e3d94cc + 7f40871 commit 38eb1c8

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@ versions available. Each version of the Fourmolu Action generally has a
2323
corresponding version of `fourmolu`. Make sure you pick a Fourmolu Action
2424
version that uses the version of `fourmolu` you use locally.
2525

26+
### Full Example
27+
28+
Here's a full YAML file you can copy and paste into your repo that runs
29+
`fourmolu-action`. Add this as a file like `.github/workflows/fourmolu.yaml`.
30+
This Workflow will run everytime you push to a branch.
31+
32+
```yaml
33+
name: fourmolu
34+
on: push
35+
jobs:
36+
format:
37+
runs-on: ubuntu-latest
38+
steps:
39+
# Note that you must checkout your code before running fourmolu/fourmolu-action
40+
- uses: actions/checkout@v2
41+
- uses: fourmolu/fourmolu-action@v1
42+
```
43+
44+
### Example with more Options
45+
2646
Here's a more complicated example that shows more options being used:
2747

2848
```yaml
@@ -39,7 +59,7 @@ Here's a more complicated example that shows more options being used:
3959
extra-args: "--indent-wheres true"
4060
```
4161

42-
## Example Usage with Build Matrix
62+
### Example Usage with Build Matrix
4363

4464
If you are using a build matrix, then it is more efficient to have a
4565
separate job for checking of formatting:
@@ -65,6 +85,9 @@ passes.
6585
The available options are defined in [`./action.yml`](./action.yml). See that
6686
file for more explanation.
6787

88+
<!-- fourmolu-action currently doesn't support running on Windows. -->
89+
<!--
90+
6891
## Windows
6992

7093
If you are running a workflow on Windows, be wary of [Git's
@@ -76,6 +99,8 @@ disable `core.autocrlf`:
7699
$ git config --global core.autocrlf false
77100
```
78101

102+
-->
103+
79104
## Hacking on this repo
80105

81106
In order to do development on this repo, you first need to install NodeJS and

0 commit comments

Comments
 (0)