From 24be6a4d8e15f9d41e0b041339bef49803c9cbfe Mon Sep 17 00:00:00 2001 From: Matt Isenhower Date: Sat, 16 Mar 2024 21:54:52 -0700 Subject: [PATCH] Add an action to automatically fix code styles --- .github/workflows/fix-code-styles.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/fix-code-styles.yml diff --git a/.github/workflows/fix-code-styles.yml b/.github/workflows/fix-code-styles.yml new file mode 100644 index 0000000..1241a54 --- /dev/null +++ b/.github/workflows/fix-code-styles.yml @@ -0,0 +1,25 @@ +name: Fix code styles + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + cache: 'npm' + - run: npm ci + - run: npm run lint-fix + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Fix styling