Skip to content

rename global state key #151

rename global state key

rename global state key #151

Workflow file for this run

name: Code Style fix
on:
pull_request_target:
branches:
- main
types:
- closed
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
codeStyle:
name: Fix Code Style
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true }} || ${{ github.event_name == 'workflow_dispatch' }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: npm install
- name: Run Prettier
id: prettier-run
run: |
npm run prettier:fix
echo "filecount=$(git status -s -uno | wc -L)" >> $GITHUB_OUTPUT
- name: Commit changes
if: ${{ steps.prettier-run.outputs.filecount > 0 }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions - Prettier"
git add .
git commit -m "Run Prettier"
git push