Compare commits

..

11 Commits

2 changed files with 9 additions and 8 deletions
+5 -5
View File
@@ -1,9 +1,9 @@
FROM node:20-slim
FROM alpine
# force rebuild to ensure git is installed
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache bash nodejs npm git \
&& node --version \
&& npm --version \
&& git --version
WORKDIR /action
+4 -3
View File
@@ -1,5 +1,4 @@
import { spawnSync } from 'child_process';
import path from 'path';
import { GITEA_SERVER_URL, GITEA_REPOSITORY, GITEA_TOKEN, PR_HEAD_BRANCH, FINDINGS_PATH } from './config.js';
function git(args, cwd) {
@@ -10,8 +9,10 @@ function git(args, cwd) {
}
export async function commitAndPush(workspace) {
const repoDir = path.join(workspace, GITEA_REPOSITORY);
const remoteUrl = GITEA_SERVER_URL.replace(/\/$/, '').replace('https://', `https://${GITEA_TOKEN}@`).replace('http://', `http://${GITEA_TOKEN}@`) + `/${GITEA_REPOSITORY}.git`;
const repoDir = workspace;
const remoteUrl = GITEA_SERVER_URL.replace(/\/$/, '')
.replace('https://', `https://${GITEA_TOKEN}@`)
.replace('http://', `http://${GITEA_TOKEN}@`) + `/${GITEA_REPOSITORY}.git`;
try {
git(['config', 'user.email', 'ai-review[bot]@gitea'], repoDir);