-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.41 KB
/
node.js.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Node.js Workflow
on:
push:
branches: ['main']
pull_request:
branches: ['main']
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Setup Bun Env
uses: oven-sh/setup-bun@v1
with:
bun-version: 'latest'
- name: Install
run: bun install
- name: Lint
run: bun run lint
continue-on-error: true
- name: Format
run: bun run format
- name: Commit All Changes
uses: stefanzweifel/[email protected]
id: auto-commit-action
with:
commit_user_name: My GitHub Actions Bot
commit_user_email: [email protected]
commit_author: Author <[email protected]>
commit_message: '[ci] Format changes'
skip_dirty_check: true
- name: 'Run if changes have been detected'
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: echo "Changes!"
- name: 'Run if no changes have been detected'
if: steps.auto-commit-action.outputs.changes_detected == 'false'
run: echo "No Changes!"