perf(ci): push to local registry + SSH pipe (layers cacheable for future builds)
Deploy Dashboard (Dev) / Backend Tests (push) Successful in 1m15s
Deploy Dashboard (Dev) / Frontend Tests (push) Successful in 56s
Deploy Dashboard (Main) / Backend Tests (push) Successful in 2m40s
Deploy Dashboard (Main) / Frontend Tests (push) Successful in 5s
Deploy Dashboard (Main) / Build Main Image (push) Failing after 15s
Deploy Dashboard (Main) / Deploy to Production (push) Has been skipped
Deploy Dashboard (Dev) / Build Dev Image (push) Failing after 18s
Deploy Dashboard (Dev) / Deploy to Dev (push) Has been skipped
Deploy Dashboard (Dev) / Backend Tests (push) Successful in 1m15s
Deploy Dashboard (Dev) / Frontend Tests (push) Successful in 56s
Deploy Dashboard (Main) / Backend Tests (push) Successful in 2m40s
Deploy Dashboard (Main) / Frontend Tests (push) Successful in 5s
Deploy Dashboard (Main) / Build Main Image (push) Failing after 15s
Deploy Dashboard (Main) / Deploy to Production (push) Has been skipped
Deploy Dashboard (Dev) / Build Dev Image (push) Failing after 18s
Deploy Dashboard (Dev) / Deploy to Dev (push) Has been skipped
This commit is contained in:
@@ -165,22 +165,23 @@ jobs:
|
||||
git clone --depth=1 --branch "$GITHUB_REF_NAME" "http://100.78.131.124:3300/${GITHUB_REPOSITORY}.git" .
|
||||
fi
|
||||
|
||||
- name: Build dev Docker image
|
||||
- name: Build and transfer dev Docker image
|
||||
run: |
|
||||
set -e
|
||||
echo "Building on VPS (SSD)..."
|
||||
# Podman caches layers automatically; no --cache-from needed
|
||||
podman build -t nas-dashboard-dev:latest dashboard/
|
||||
|
||||
- name: Transfer image to NAS
|
||||
run: |
|
||||
set -e
|
||||
REGISTRY="100.78.131.124:5501"
|
||||
TAG="$REGISTRY/nas-dashboard-dev:$GITHUB_SHA"
|
||||
LATEST_TAG="$REGISTRY/nas-dashboard-dev:latest"
|
||||
podman build -t "$TAG" -t "$LATEST_TAG" dashboard/
|
||||
echo "Pushing to local registry..."
|
||||
podman push --tls-verify=false "$TAG"
|
||||
podman push --tls-verify=false "$LATEST_TAG"
|
||||
echo "Streaming dev image to NAS..."
|
||||
SSH_OPTS="-o ConnectTimeout=15 -o ServerAliveInterval=15 -o ServerAliveCountMax=3"
|
||||
podman save nas-dashboard-dev:latest | gzip | ssh $SSH_OPTS nasts "gunzip | /volume1/@appstore/ContainerManager/usr/bin/docker load 2>&1"
|
||||
podman save "$LATEST_TAG" | gzip | ssh $SSH_OPTS nasts "gunzip | /volume1/@appstore/ContainerManager/usr/bin/docker load 2>&1"
|
||||
echo "Retagging image..."
|
||||
ssh $SSH_OPTS nasts "/volume1/@appstore/ContainerManager/usr/bin/docker tag localhost/nas-dashboard-dev:latest nas-dashboard-dev:latest 2>&1 && /volume1/@appstore/ContainerManager/usr/bin/docker image rm localhost/nas-dashboard-dev:latest 2>&1"
|
||||
echo "Dev image transferred and retagged successfully"
|
||||
ssh $SSH_OPTS nasts "/volume1/@appstore/ContainerManager/usr/bin/docker tag $REGISTRY/nas-dashboard-dev:latest nas-dashboard-dev:latest 2>&1"
|
||||
echo "Dev image built, pushed, and transferred"
|
||||
|
||||
deploy-dev:
|
||||
name: Deploy to Dev
|
||||
|
||||
Reference in New Issue
Block a user