-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use node LTS in prettier workflow (#6)
* use node 16 in prettier workflow * chore: set to use LTS, update action versions --------- Co-authored-by: William Killerud <[email protected]>
- Loading branch information
Showing
1 changed file
with
9 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,25 +7,20 @@ on: | |
|
||
jobs: | ||
format: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: use node.js 12 | ||
uses: actions/setup-node@v1 | ||
- uses: actions/checkout@v4 | ||
- name: Use Node LTS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 12 | ||
- name: prettify code | ||
node-version: 'lts/*' | ||
- name: Run Prettier | ||
run: | | ||
npx prettier --write **/* | ||
- name: commit changes | ||
shell: bash | ||
- name: Commit and push changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -am "chore(prettier): format code" | ||
continue-on-error: true | ||
- name: push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
git diff --quiet || (git commit -a -m "chore(prettier): format code" && git push) | ||
shell: bash |