-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b51851
commit 151432e
Showing
1 changed file
with
22 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
name: YAML Lint | ||
on: [push] # yamllint disable-line rule:truthy | ||
name: Format YAML | ||
|
||
on: | ||
push: | ||
tags: '*' | ||
pull_request: | ||
merge_group: | ||
|
||
jobs: | ||
config: | ||
format: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: yaml-lint | ||
uses: ibiqlik/action-yamllint@v3 | ||
with: | ||
file_or_dir: config | ||
strict: true | ||
# Ignore warning | ||
config_data: | | ||
extends: default | ||
rules: | ||
document-start: disable | ||
line-length: disable | ||
- 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 | ||
|
||
- name: Check formatting diff | ||
if: steps.filter.outputs.julia_file_change == 'true' | ||
run: | | ||
git diff --color=always --exit-code |