Skip to content

Commit 775bd63

Browse files
authored
Use run-ormolu action instead of cabal (#3112)
1 parent c1b6daf commit 775bd63

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

.github/workflows/check-formatting.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,12 @@ jobs:
3838
with:
3939
fetch-depth: 0
4040

41-
- name: Check for Haskell file changes
42-
id: haskell-changes
41+
- name: Parse oromolu version
42+
working-directory: waspc
4343
run: |
44-
if git diff --name-only origin/${{ github.base_ref }}..HEAD | grep -E 'waspc/.*\.hs$'; then
45-
echo "run=true" >> $GITHUB_OUTPUT
46-
else
47-
echo "run=false" >> $GITHUB_OUTPUT
48-
fi
49-
50-
- uses: ./.github/actions/setup-haskell
51-
if: steps.haskell-changes.outputs.run == 'true'
52-
53-
- working-directory: waspc
54-
if: steps.haskell-changes.outputs.run == 'true'
55-
run: ./run ormolu:check
44+
echo "ORMOLU_VERSION=$(grep 'ormolu ==' dev-tool.project | sed 's/.*==\s*\([0-9.]*\).*/\1/')" >> $GITHUB_ENV
45+
46+
# `run-ormolu` versions > 15 require ormolu version >= 0.7.5.0
47+
- uses: haskell-actions/run-ormolu@v15
48+
with:
49+
version: ${{ env.ORMOLU_VERSION }}

0 commit comments

Comments
 (0)