Compare commits

...

5 Commits

2 changed files with 7 additions and 10 deletions
+5 -5
View File
@@ -1,9 +1,9 @@
FROM node:20-slim
FROM alpine
RUN apt-get update && \
apt-get install -y --no-install-recommends git && \
rm -rf /var/lib/apt/lists/* && \
git --version
RUN apk add --no-cache bash nodejs npm git \
&& node --version \
&& npm --version \
&& git --version
WORKDIR /action
+2 -5
View File
@@ -1,12 +1,9 @@
import { spawnSync } from 'child_process';
import { execSync } 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) {
const result = spawnSync('git', args, { cwd, encoding: 'utf8' });
if (result.error) throw result.error;
if (result.status !== 0) throw new Error((result.stderr || result.stdout || '').trim());
return (result.stdout || '').trim();
return execSync(`git ${args.map(a => `'${a.replace(/'/g, "'\\''")}'`).join(' ')}`, { cwd, encoding: 'utf8' }).trim();
}
export async function commitAndPush(workspace) {