Skip to content

Update blank.yml

Update blank.yml #5

Workflow file for this run

name: Code Style
on: [push, pull_request]
permissions:
contents: read
jobs:
fpm:
name: Fortran Code Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install fprettify
run: |
sudo apt-get install -y python3-pip
pip3 install fprettify
- name: Format Fortran files
run: |
fprettify -i 4 -d --recursive .
git add .
- name: Fail if needs reformatting
run: |
if [[ $(git status --porcelain) ]]; then
echo "please reformat/fprettify these files:"
git status --porcelain=v1
echo "exact diff:"
git diff
exit 1
fi