Skip to content

Commit

Permalink
Merge pull request #4778 from unisonweb/aryairani-patch-4
Browse files Browse the repository at this point in the history
fix condition on ormolu manual workflow
  • Loading branch information
aryairani authored Mar 13, 2024
2 parents 3b0264e + 3f077d9 commit 75fabc4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
workflow_dispatch:

env:
ormolu_version: "0.5.0.1"
ormolu_version: "0.5.2.0"
racket_version: "8.7"
ucm_local_bin: "ucm-local-bin"
jit_version: "@unison/internal/releases/0.0.11"
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/ormolu.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
name: ormolu
# This workflow runs ormolu on all Haskell files in the branch and creates a PR with the result.
# (The ormolu job in CI.yaml only runs ormolu on Haskell files that have changed in that PR.)

defaults:
run:
shell: bash
name: ormolu everything

on:
workflow_dispatch:

env:
ormolu_version: "0.5.0.1"
ormolu_version: "0.5.2.0"

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
- name: create pull request with 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
branch: autoformat/${{github.ref_name}}
# branch_suffix: random
title: format `${{github.ref_name}}` with ormolu ${{env.ormolu_version}}

0 comments on commit 75fabc4

Please sign in to comment.