-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 1.1 KB
/
format.yml
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
name: Format
on:
push:
pull_request_target:
workflow_dispatch:
permissions: write-all
jobs:
format:
name: Format
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{secrets.TOKEN || secrets.GITHUB_TOKEN}}
ref: ${{github.head_ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Setup Node.JS
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- name: Install
run: npm install
- name: Format
run: npm run format
- name: Assert clean
if: startsWith(github.ref_name, 'dependabot/') == true
run: if [[ `git status --porcelain` ]]; then exit 1; fi
- name: Commit
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
with:
commit_message: Format