fix: Reorderable #2022
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: Style Prettier | |
on: [push] | |
jobs: | |
style: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 19.x ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install node packages | |
run: npm ci | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- name: Run fixer | |
run: npm run prettier | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Apply prettier changes | |
push_options: '--force' | |
branch: ${{ steps.extract_branch.outputs.branch }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |