Add YAML Linter GHA #12
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
name: Format YAML | ||
on: | ||
push: | ||
pull_request: | ||
merge_group: | ||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download yamlfmt binary | ||
run: | | ||
curl -L https://github.com/google/yamlfmt/releases/download/v0.11.0/yamlfmt_0.11.0_Linux_x86_64.tar.gz -o yamlfmt | ||
chmod +x yamlfmt | ||
- name: Format YAML files | ||
run: ./yamlfmt -d path/to/your/folder | ||
exit-code: 0 | ||
- name: Check formatting diff | ||
if: steps.filter.outputs.julia_file_change == 'true' | ||
run: | | ||
git diff --color=always --exit-code |