Skip to content

Add YAML Linter GHA #14526

Add YAML Linter GHA

Add YAML Linter GHA #14526

name: JuliaFormatter
on:
push:
tags: '*'
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
format:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dorny/[email protected]
id: filter
with:
filters: |
julia_file_change:
- added|modified: '**.jl'
- uses: julia-actions/setup-julia@latest
if: steps.filter.outputs.julia_file_change == 'true'
with:
version: '1.10'
- name: Apply JuliaFormatter
if: steps.filter.outputs.julia_file_change == 'true'
run: |
julia --project=.dev .dev/climaformat.jl .
- name: Check formatting diff
if: steps.filter.outputs.julia_file_change == 'true'
run: |
git diff --color=always --exit-code
yaml_format:
runs-on: ubuntu-latest
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 config
exit-code: 0

Check failure on line 53 in .github/workflows/julia_formatter.yml

View workflow run for this annotation

GitHub Actions / JuliaFormatter

Invalid workflow file

The workflow is not valid. .github/workflows/julia_formatter.yml (Line: 53, Col: 7): Unexpected value 'exit-code'
- name: Check formatting diff
run: |
git diff --color=always --exit-code