Skip to content

Update all non-major dependencies #396

Update all non-major dependencies

Update all non-major dependencies #396

Workflow file for this run

name: Prettier
on:
push:
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
- uses: actions/cache@v4
id: cache
with:
path: node_modules
key: node_modules-${{ hashFiles('package-lock.json') }}-18
- run: npm ci
if: steps.cache.outputs.cache-hit != 'true'
- run: npx prettier --check src
- name: Create or Update PR
if: ${{ failure() }}
run: |
npx prettier --write --log-level silent
BASE_BRANCH=$( git rev-parse --abbrev-ref HEAD )
HEAD_BRANCH="prettier/$BASE_BRANCH"
git config --global user.email "[email protected]"
git config --global user.name "FineArchs"
git add .
git commit -m"prettier $BASE_BRANCH"
git branch -m $HEAD_BRANCH
git push -f -u origin $HEAD_BRANCH
PRS=$(gh pr list --json id -H $HEAD_BRANCH -s open)
if [ "$PRS" == '[]' ]
then
gh pr create --base $BASE_BRANCH --fill --label bot
else
echo "$PRS"
fi