Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions .github/workflows/yml-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: YAML Formatting
name: YAML Lint

on: [pull_request]
on:
pull_request:

jobs:
format:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -12,13 +13,5 @@ jobs:
- name: Install Prettier
run: npm install --global prettier

- name: Format YAML files
run: prettier --write "**/*.yml"

- name: Commit changes
run: |
git config --global user.name "github-actions"
git config --global user.email "actions@github.com"
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "chore: auto-format YAML files" -s
git push
- name: Check YAML formatting
run: prettier --check "**/*.yaml"
Loading