Skip to content

Commit be4b1bd

Browse files
Copilothuangyiirene
andcommitted
Add auto-merge configuration for pnpm-lock.yaml in CI workflows
Co-authored-by: huangyiirene <[email protected]>
1 parent c058eef commit be4b1bd

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ jobs:
2626
with:
2727
fetch-depth: 0
2828

29+
- name: Configure Git Merge Driver for pnpm-lock.yaml
30+
run: |
31+
# Configure custom merge driver for pnpm-lock.yaml
32+
git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver"
33+
git config merge.pnpm-merge.driver \
34+
"pnpm install --no-frozen-lockfile"
35+
36+
# Apply merge driver (CI-only, doesn't affect repository)
37+
echo "pnpm-lock.yaml merge=pnpm-merge" >> .git/info/attributes
38+
2939
- name: Install pnpm
3040
uses: pnpm/action-setup@v3
3141
with:

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ jobs:
1616
- name: Checkout Repo
1717
uses: actions/checkout@v4
1818

19+
- name: Configure Git Merge Driver for pnpm-lock.yaml
20+
run: |
21+
# Configure custom merge driver for pnpm-lock.yaml
22+
git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver"
23+
git config merge.pnpm-merge.driver \
24+
"pnpm install --no-frozen-lockfile"
25+
26+
# Apply merge driver (CI-only, doesn't affect repository)
27+
echo "pnpm-lock.yaml merge=pnpm-merge" >> .git/info/attributes
28+
1929
- name: Install pnpm
2030
uses: pnpm/action-setup@v3
2131
with:

.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ jobs:
1414
- name: Checkout Repo
1515
uses: actions/checkout@v4
1616

17+
- name: Configure Git Merge Driver for pnpm-lock.yaml
18+
run: |
19+
# Configure custom merge driver for pnpm-lock.yaml
20+
git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver"
21+
git config merge.pnpm-merge.driver \
22+
"pnpm install --no-frozen-lockfile"
23+
24+
# Apply merge driver (CI-only, doesn't affect repository)
25+
echo "pnpm-lock.yaml merge=pnpm-merge" >> .git/info/attributes
26+
1727
- name: Install pnpm
1828
uses: pnpm/action-setup@v3
1929
with:

0 commit comments

Comments
 (0)