Skip to content

Commit 104114c

Browse files
committed
[Chore] Fix build static action permission issue
Signed-off-by: Kent Huang <kent@infuseai.io>
1 parent 819f968 commit 104114c

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

.github/workflows/build-statics.yaml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Node.js - Build & Auto-Commit to CLI data/report/**
32

43
on:
@@ -17,35 +16,40 @@ jobs:
1716
if_merged_build:
1817
if: github.event.pull_request.merged == true
1918
runs-on: ubuntu-latest
19+
20+
permissions:
21+
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
22+
contents: write
23+
2024
defaults:
2125
run:
2226
working-directory: ./js
2327

2428
steps:
25-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v3
2630

27-
- name: Use Node.js ${{ matrix.node-version }}
28-
uses: actions/setup-node@v3
29-
with:
30-
node-version: 20
31+
- name: Use Node.js ${{ matrix.node-version }}
32+
uses: actions/setup-node@v3
33+
with:
34+
node-version: 20
3135

32-
- uses: pnpm/action-setup@v2.2.2
33-
with:
34-
version: 8
36+
- uses: pnpm/action-setup@v2.2.2
37+
with:
38+
version: 8
3539

36-
- name: Install dependencies
37-
working-directory: ./js
38-
run: pnpm install --frozen-lockfile
40+
- name: Install dependencies
41+
working-directory: ./js
42+
run: pnpm install --frozen-lockfile
3943

4044

41-
- name: Build Apps
42-
run: pnpm run build
45+
- name: Build Apps
46+
run: pnpm run build
4347

44-
- name: Pull Remote Changes (before AC)
45-
run: git pull origin main
48+
- name: Pull Remote Changes (before AC)
49+
run: git pull origin main
4650

47-
- uses: stefanzweifel/git-auto-commit-action@v4
48-
with:
49-
commit_message: AUTO-COMMIT - build js statics to recce data/
50-
branch: ${{ github.base_ref }}
51-
# Auto-commits to target merge branch
51+
- uses: stefanzweifel/git-auto-commit-action@v4
52+
with:
53+
commit_message: AUTO-COMMIT - build js statics to recce data/
54+
branch: ${{ github.base_ref }}
55+
# Auto-commits to target merge branch

0 commit comments

Comments
 (0)