mirror of
https://git.aramjonghu.nl/AramJonghu/aramjonghu-site.git
synced 2026-06-06 17:18:24 +02:00
test forgejo actions
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user