diff --git a/.forgejo/workflows/format.yml b/.forgejo/workflows/format.yml index fdf56b9..9df042d 100644 --- a/.forgejo/workflows/format.yml +++ b/.forgejo/workflows/format.yml @@ -1,4 +1,4 @@ -name: Format code with Prettier +name: Format frontend with Prettier on: push: @@ -7,22 +7,27 @@ on: jobs: format: runs-on: linux - container: node:20-bookworm + container: alpine:latest steps: + - name: Install dependencies + run: apk add --no-cache nodejs npm git + - name: Checkout repo uses: actions/checkout@v4 - - name: Install dependencies + - name: Install frontend deps + working-directory: frontend run: npm install - name: Run Prettier + working-directory: frontend run: npx prettier --write . - - name: Commit changes (if any) + - name: Commit changes run: | git config user.name "forgejo-bot" git config user.email "forgejo-bot@local" - git add . - git diff --cached --quiet || git commit -m "chore: format with prettier" + git add frontend + git diff --cached --quiet || git commit -m "chore: format frontend with prettier" git push