Skip to content

docs: add bug report and feature request issue templates (#392) #2792

docs: add bug report and feature request issue templates (#392)

docs: add bug report and feature request issue templates (#392) #2792

Workflow file for this run

name: fourmolu
on: push
jobs:
format:
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache fourmolu
id: cache-fourmolu
uses: actions/cache@v5
with:
path: ~/.local/bin/fourmolu
key: fourmolu-0.19.0.0
- name: Install fourmolu
if: steps.cache-fourmolu.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.local/bin
curl -sL https://github.com/fourmolu/fourmolu/releases/download/v0.19.0.0/fourmolu-0.19.0.0-linux-x86_64 -o ~/.local/bin/fourmolu
chmod +x ~/.local/bin/fourmolu
- name: Add fourmolu to PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Format code
run: make fmt
- name: Commit formatted code
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git diff --staged --quiet || git commit -m "Auto-format code with fourmolu"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}