Merge pull request #63 from CJackHwang/codex/fix-issues-in-image-analysis

Use repository root Dockerfile, make Go cross-build robust, and fix process wait logic
This commit is contained in:
CJACK.
2026-02-28 18:51:57 +08:00
committed by GitHub
4 changed files with 10 additions and 6 deletions

View File

@@ -113,7 +113,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/Dockerfile
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |

View File

@@ -114,7 +114,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/Dockerfile
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |

View File

@@ -8,12 +8,15 @@ RUN npm run build
FROM golang:1.24 AS go-builder
WORKDIR /app
ARG TARGETOS=linux
ARG TARGETARCH=amd64
ARG TARGETOS
ARG TARGETARCH
COPY go.mod go.sum* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /out/ds2api ./cmd/ds2api
RUN set -eux; \
GOOS="${TARGETOS:-$(go env GOOS)}"; \
GOARCH="${TARGETARCH:-$(go env GOARCH)}"; \
CGO_ENABLED=0 GOOS="${GOOS}" GOARCH="${GOARCH}" go build -o /out/ds2api ./cmd/ds2api
FROM busybox:1.36.1-musl AS busybox-tools

View File

@@ -338,7 +338,8 @@ function showStatus() {
function waitForProcesses() {
return new Promise(resolve => {
const check = setInterval(() => {
if (processes.filter(p => !p.killed).length === 0) {
const activeCount = processes.filter(proc => proc.exitCode === null && proc.signalCode === null).length;
if (activeCount === 0) {
clearInterval(check);
resolve();
}