Skip to content

Commit

Permalink
chore: use node LTS in prettier workflow (#6)
Browse files Browse the repository at this point in the history
* use node 16 in prettier workflow
* chore: set to use LTS, update action versions

---------

Co-authored-by: William Killerud <[email protected]>
  • Loading branch information
BalbinaK and wkillerud authored Jan 9, 2024
1 parent 17c6db3 commit 3102e7c
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3102e7c

Please sign in to comment.