test forgejo actions

This commit is contained in:
2026-05-06 19:59:44 +02:00
parent bcf1fc8b45
commit 6fb9fadd11
+11 -6
View File
@@ -1,4 +1,4 @@
name: Format code with Prettier name: Format frontend with Prettier
on: on:
push: push:
@@ -7,22 +7,27 @@ on:
jobs: jobs:
format: format:
runs-on: linux runs-on: linux
container: node:20-bookworm container: alpine:latest
steps: steps:
- name: Install dependencies
run: apk add --no-cache nodejs npm git
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install dependencies - name: Install frontend deps
working-directory: frontend
run: npm install run: npm install
- name: Run Prettier - name: Run Prettier
working-directory: frontend
run: npx prettier --write . run: npx prettier --write .
- name: Commit changes (if any) - name: Commit changes
run: | run: |
git config user.name "forgejo-bot" git config user.name "forgejo-bot"
git config user.email "forgejo-bot@local" git config user.email "forgejo-bot@local"
git add . git add frontend
git diff --cached --quiet || git commit -m "chore: format with prettier" git diff --cached --quiet || git commit -m "chore: format frontend with prettier"
git push git push