-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add pipeline for yaml formatting using prettier
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 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 |
---|---|---|
@@ -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 }} |