-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4778 from unisonweb/aryairani-patch-4
fix condition on ormolu manual workflow
- Loading branch information
Showing
2 changed files
with
9 additions
and
14 deletions.
There are no files selected for viewing
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
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
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}} |