fix: 修复 CI 工作流 lockfile 和 SSH 问题

This commit is contained in:
Tthfyth
2025-12-08 17:57:58 +08:00
parent 3c597aafa2
commit 568df9b22b
2 changed files with 21 additions and 4 deletions

View File

@@ -18,6 +18,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure Git to use HTTPS instead of SSH
run: git config --global url."https://github.com/".insteadOf "git@github.com:"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
@@ -58,6 +61,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure Git to use HTTPS instead of SSH
run: git config --global url."https://github.com/".insteadOf "git@github.com:"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
@@ -100,6 +106,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure Git to use HTTPS instead of SSH
run: git config --global url."https://github.com/".insteadOf "git@github.com:"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:

View File

@@ -13,10 +13,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure Git to use HTTPS instead of SSH
run: git config --global url."https://github.com/".insteadOf "git@github.com:"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
@@ -25,7 +28,7 @@ jobs:
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --no-frozen-lockfile
- name: Run ESLint
run: pnpm run lint
@@ -46,10 +49,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure Git to use HTTPS instead of SSH
run: git config --global url."https://github.com/".insteadOf "git@github.com:"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
@@ -58,11 +64,12 @@ jobs:
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --no-frozen-lockfile
- name: Build application
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: false
run: pnpm run build
- name: Run tests
@@ -71,4 +78,5 @@ jobs:
- name: Package application
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: false
run: pnpm run package