| 1 | name: Workflow Lint |
| 2 | |
| 3 | ## Note: to install `prettier` locally, see https://prettier.io/docs/en/install, |
| 4 | ## or just: `npm install --save-dev --save-exact prettier` |
| 5 | |
| 6 | ## If you already have `prettier` installed, to run it locally, |
| 7 | ## just run: `npx prettier --check **.yml` . |
| 8 | |
| 9 | on: |
| 10 | push: |
| 11 | branches: |
| 12 | - master |
| 13 | paths: |
| 14 | - '**.yml' |
| 15 | pull_request: |
| 16 | paths: |
| 17 | - '**.yml' |
| 18 | |
| 19 | jobs: |
| 20 | lint-yml-workflows: |
| 21 | runs-on: ubuntu-latest |
| 22 | steps: |
| 23 | - uses: actions/checkout@v6 |
| 24 | - name: Verify formatting |
| 25 | uses: creyD/[email protected] |
| 26 | with: |
| 27 | prettier_options: --check **.yml |
| 28 | |