issue no.20 solved dialogue box UI updated #9
Workflow file for this run
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: Code Style fix | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
# Allows you to run this workflow manually from the Actions tab on GitHub. | |
workflow_dispatch: | |
# Allow this job to clone the repo and create a page deployment | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: false | |
jobs: | |
codeStyle: | |
name: Fix Code Style | |
runs-on: ubuntu-latest | |
if: ${{ github.event.pull_request.merged == true }} || ${{ github.event_name == 'workflow_dispatch' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: npm install | |
- name: Run Prettier | |
id: prettier-run | |
run: | | |
npm run prettier | |
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 |