forked from sanity-io/sanity-template-nextjs-clean
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1.34 KB
/
prettier.yml
File metadata and controls
48 lines (42 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Prettier
on:
push:
branches: [main, feat/ci-renovate-prettier]
paths-ignore:
- 'package-lock.json'
- '**/package-lock.json'
- 'yarn.lock'
- '**/yarn.lock'
- 'pnpm-lock.yaml'
- '**/pnpm-lock.yaml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
run:
name: Can the code be prettier? 🤔
runs-on: ubuntu-latest
# workflow_dispatch always lets you select the branch ref, even though in this case we only ever want to run the action on `main` this we need an if check
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
cache: npm
node-version: lts/*
- run: npm install
- run: npm run format
- uses: actions/create-github-app-token@v2
id: generate-token
with:
app-id: ${{ secrets.ECOSPARK_APP_ID }}
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7
with:
body: I ran `pnpm format` 🧑💻
branch: actions/prettier
commit-message: "chore(prettier): 🤖 ✨"
labels: 🤖 bot
sign-commits: true
title: "chore(prettier): 🤖 ✨"
token: ${{ steps.generate-token.outputs.token }}