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:
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