Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a28d1f1ef | |||
| d04f4dd2bb | |||
| f5cf5950bd | |||
| eae73092ad | |||
| 69624a542e | |||
| 8aa273b8bd | |||
| 00458d4eb2 |
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
FROM node:20-slim
|
FROM alpine
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apk add --no-cache bash nodejs npm git \
|
||||||
apt-get install -y --no-install-recommends git && \
|
&& node --version \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
&& npm --version \
|
||||||
git --version
|
&& git --version
|
||||||
|
|
||||||
WORKDIR /action
|
WORKDIR /action
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
import { spawnSync } from 'child_process';
|
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';
|
import { GITEA_SERVER_URL, GITEA_REPOSITORY, GITEA_TOKEN, PR_HEAD_BRANCH, FINDINGS_PATH } from './config.js';
|
||||||
|
|
||||||
function git(args, cwd) {
|
function git(args, cwd) {
|
||||||
@@ -10,7 +9,7 @@ function git(args, cwd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function commitAndPush(workspace) {
|
export async function commitAndPush(workspace) {
|
||||||
const repoDir = path.join(workspace, GITEA_REPOSITORY);
|
const repoDir = workspace;
|
||||||
const remoteUrl = GITEA_SERVER_URL.replace(/\/$/, '')
|
const remoteUrl = GITEA_SERVER_URL.replace(/\/$/, '')
|
||||||
.replace('https://', `https://${GITEA_TOKEN}@`)
|
.replace('https://', `https://${GITEA_TOKEN}@`)
|
||||||
.replace('http://', `http://${GITEA_TOKEN}@`) + `/${GITEA_REPOSITORY}.git`;
|
.replace('http://', `http://${GITEA_TOKEN}@`) + `/${GITEA_REPOSITORY}.git`;
|
||||||
|
|||||||
Reference in New Issue
Block a user