-
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 863 Bytes
/
prettier.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Prettier
on:
push:
branches: [main, master]
pull_request:
types: [opened, reopened, synchronize]
permissions: write-all
jobs:
prettier:
if: "!contains(github.actor, 'win11bot')" # Skips if the bot triggered the event
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Run Commands
run: |
npx prettier --write .
git config --global user.name "win11bot"
git config --global user.email "w11bot@andrewstech.me"
git add .
set +e
git status | grep modified
if [ $? -eq 0 ]
then
set -e
git commit -m "Prettier" -m "skip actions"
git push
else
set -e
echo "No changes since last run"
fi