Skip to content

Commit

Permalink
ci: add pipeline for yaml formatting using prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
kluge7 committed Sep 25, 2024
1 parent 4a3e1c2 commit aad0bfc
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/yaml-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Yaml Format (prettier)

on: [push]

jobs:
prettier:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Install Prettier
run: |
sudo npm install -g prettier
# Run Prettier to format all YAML files
- name: Run Prettier to format YAML files
run: |
prettier --write "**/*.yaml" "**/*.yml"
# Commit Prettier changes
- name: Commit Prettier changes
uses: EndBug/add-and-commit@v9
with:
author_name: Prettier Robot
author_email: [email protected]
message: "Committing Prettier formatting fixes"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit aad0bfc

Please sign in to comment.