Update Dependencies #1
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
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 "[email protected]" | |
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 |