-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (36 loc) · 1.29 KB
/
Copy pathformat.yml
File metadata and controls
45 lines (36 loc) · 1.29 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
name: Format
on:
push:
pull_request:
workflow_dispatch:
permissions: {}
concurrency:
group: ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}
cancel-in-progress: true
jobs:
format:
runs-on: ubuntu-24.04
permissions:
contents: write # Needed to push
actions: write # Allow formatting actions too
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{secrets.TOKEN||github.token}}
persist-credentials: true
- name: Setup Node.JS
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: package.json
- name: Install
run: npm ci
- name: Format
run: node --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@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0
with:
commit_message: Format