ci: reduce Docker build disk usage

This commit is contained in:
2026-08-11 14:22:44 +08:00
parent df75ab272f
commit 40acd35ad7
2 changed files with 14 additions and 12 deletions
+2
View File
@@ -7,6 +7,8 @@
.codex-temp/
.codex_tmp_danmaku
.codex_tmp_danmaku/
.ci
.ci/
artifacts
artifacts/
ConsoleApp1
Vendored
+12 -12
View File
@@ -208,9 +208,9 @@ pipeline {
--build-arg http_proxy="$HTTP_PROXY_URL" \
--build-arg https_proxy="$HTTP_PROXY_URL" \
--build-arg no_proxy="$NO_PROXY_HOSTS" \
-f src/LiveRecorder.WebApi/Dockerfile -t "$api_ref" --load .
./scripts/ci-docker.sh push "$api_ref"
./scripts/ci-docker.sh rmi "$api_ref" >/dev/null
-f src/LiveRecorder.WebApi/Dockerfile -t "$api_ref" --push .
./scripts/ci-docker.sh buildx prune \
--builder "$BUILDER_NAME" --all --force
./scripts/ci-docker.sh buildx build \
--builder "$BUILDER_NAME" --platform "$platform" --network host \
@@ -224,9 +224,9 @@ pipeline {
--build-arg https_proxy="$HTTP_PROXY_URL" \
--build-arg no_proxy="$NO_PROXY_HOSTS" \
--build-arg VITE_API_BASE_URL=/api \
-f frontend/Dockerfile -t "$web_ref" --load frontend
./scripts/ci-docker.sh push "$web_ref"
./scripts/ci-docker.sh rmi "$web_ref" >/dev/null
-f frontend/Dockerfile -t "$web_ref" --push frontend
./scripts/ci-docker.sh buildx prune \
--builder "$BUILDER_NAME" --all --force
'''
}
}
@@ -255,9 +255,9 @@ pipeline {
--build-arg http_proxy="$HTTP_PROXY_URL" \
--build-arg https_proxy="$HTTP_PROXY_URL" \
--build-arg no_proxy="$NO_PROXY_HOSTS" \
-f src/LiveRecorder.WebApi/Dockerfile -t "$api_ref" --load .
./scripts/ci-docker.sh push "$api_ref"
./scripts/ci-docker.sh rmi "$api_ref" >/dev/null
-f src/LiveRecorder.WebApi/Dockerfile -t "$api_ref" --push .
./scripts/ci-docker.sh buildx prune \
--builder "$BUILDER_NAME" --all --force
./scripts/ci-docker.sh buildx build \
--builder "$BUILDER_NAME" --platform "$platform" --network host \
@@ -271,9 +271,9 @@ pipeline {
--build-arg https_proxy="$HTTP_PROXY_URL" \
--build-arg no_proxy="$NO_PROXY_HOSTS" \
--build-arg VITE_API_BASE_URL=/api \
-f frontend/Dockerfile -t "$web_ref" --load frontend
./scripts/ci-docker.sh push "$web_ref"
./scripts/ci-docker.sh rmi "$web_ref" >/dev/null
-f frontend/Dockerfile -t "$web_ref" --push frontend
./scripts/ci-docker.sh buildx prune \
--builder "$BUILDER_NAME" --all --force
'''
}
}