Skip to content

Commit a7b0828

Browse files
authored
Merge pull request #40 from HUAHUAI23/test.1
update cicd
2 parents c4a9409 + 1abb06d commit a7b0828

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/pr-check.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ jobs:
211211
const commitSha = context.payload.pull_request.head.sha;
212212
const branchName = context.payload.pull_request.head.ref;
213213
214+
// Security: Sanitize branch name for safe display in Markdown
215+
const safeBranchName = branchName.replace(/[`\[\]]/g, '\\$&');
216+
214217
let allPassed = checkResult.lintConclusion === 'success' && checkResult.dockerConclusion === 'success';
215218
let emoji = allPassed ? '✅' : '❌';
216219
let status = allPassed ? 'Passed' : 'Failed';
@@ -247,7 +250,7 @@ jobs:
247250
}
248251
249252
body += `**Commit:** \`${commitSha}\`\n`;
250-
body += `**Branch:** \`${branchName}\`\n`;
253+
body += `**Branch:** \`${safeBranchName}\`\n`;
251254
252255
if (checkResult.lintUrl || checkResult.dockerUrl) {
253256
body += `\n**🔗 View Details:**\n`;

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ENV NEXT_TELEMETRY_DISABLED=1
3232
ENV NEXT_PUBLIC_MOCK_USER=''
3333

3434
# Install pnpm and generate Prisma client before build
35+
# Prisma will use binaryTargets from schema.prisma to generate engines for all platforms
3536
RUN npm install -g pnpm && \
3637
pnpm prisma generate && \
3738
pnpm run build

prisma/schema.prisma

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
generator client {
2-
provider = "prisma-client-js"
2+
provider = "prisma-client-js"
3+
binaryTargets = ["native", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
34
}
45

56
datasource db {

0 commit comments

Comments
 (0)