ormolu everything #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ormolu | |
defaults: | |
run: | |
shell: bash | |
on: | |
workflow_dispatch: | |
env: | |
ormolu_version: "0.5.0.1" | |
jobs: | |
ormolu: | |
runs-on: ubuntu-20.04 | |
# Only run formatting on trunk commits | |
# This is because the job won't have permission to push back to | |
# contributor forks on contributor PRs. | |
if: github.ref_name == 'trunk' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/run-ormolu@v15 | |
with: | |
version: ${{ env.ormolu_version }} | |
mode: inplace | |
- name: apply formatting changes | |
uses: peter-evans/create-pull-request@v6 | |
# the previous step will "fail" if it makes any formatting changes | |
if: ${{ failure() }} | |
with: | |
commit_message: automatically run ormolu | |
branch_suffix: random |