Merge pull request #77 from Vero-Ventures/hot-fix/update-admin-panel-… #100
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: Format | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.ACTIONS_TOKEN }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
token: ${{ secrets.ACTIONS_TOKEN }} | |
- run: npm ci | |
- run: npm run format | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Apply formatting changes | |
branch: ${{ github.head_ref }} | |
# - name: Notify failure | |
# if: failure() | |
# uses: actions/github-script@v4 | |
# with: | |
# github-token: ${{ secrets.ACTIONS_TOKEN }} | |
# script: | | |
# github.issues.createComment({ | |
# issue_number: context.issue.number, | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# body: 'Formatting failed. Please check the logs.' | |
# }) |