7dd2d6df9f
Deploy Claude Dev (Dev) / deploy-claude-dev-dev (push) Failing after 10m10s
Run Tests / Backend Tests (push) Has been cancelled
Run Tests / Frontend Tests (push) Has been cancelled
Run Tests / Test Summary (push) Has been cancelled
Deploy Dashboard (Dev) / deploy-dev (push) Failing after 4m22s
Gitea Actions runner cannot fetch actions from GitHub (connection reset). Revert to manual git clone for checkout and direct tool installation.
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
name: Deploy Dashboard (Dev)
|
|
on:
|
|
push:
|
|
branches: [dev]
|
|
paths:
|
|
- 'dashboard/**'
|
|
- '.gitea/workflows/deploy-dev.yml'
|
|
|
|
concurrency:
|
|
group: deploy-dashboard-dev
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
deploy-dev:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
run: |
|
|
git clone --depth 1 --branch ${{ github.ref_name }} http://gitea:3000/jimmy/nas-tools.git .
|
|
git checkout ${{ github.sha }}
|
|
- name: Warm mirror cache for base images
|
|
run: |
|
|
set -u
|
|
mirror_host="127.0.0.1:5501"
|
|
|
|
if command -v curl >/dev/null 2>&1; then
|
|
if curl -fsS "http://${mirror_host}/v2/" >/dev/null; then
|
|
echo "Registry mirror is healthy at ${mirror_host}"
|
|
else
|
|
echo "Warning: registry mirror health check failed at ${mirror_host}; continuing with normal pull path"
|
|
fi
|
|
else
|
|
echo "Warning: curl is unavailable; skipping explicit mirror health check"
|
|
fi
|
|
|
|
prewarm_base_image() {
|
|
image_ref="$1"
|
|
mirror_ref="${mirror_host}/library/${image_ref}"
|
|
echo "Attempting mirror pre-pull: ${mirror_ref}"
|
|
if timeout 60 docker pull "${mirror_ref}"; then
|
|
docker tag "${mirror_ref}" "${image_ref}"
|
|
echo "Mirror pre-pull succeeded for ${image_ref}"
|
|
else
|
|
echo "Warning: mirror pre-pull failed for ${image_ref}; continuing with normal pull during build"
|
|
fi
|
|
}
|
|
|
|
prewarm_base_image "node:20-alpine"
|
|
prewarm_base_image "python:3.12-slim"
|
|
|
|
- name: Build dev image
|
|
run: |
|
|
export DOCKER_API_VERSION=1.43
|
|
DOCKER_BUILDKIT=0 docker build --cache-from nas-dashboard-dev:latest -t nas-dashboard-dev:latest dashboard/
|
|
- name: Sync runtime compose file
|
|
run: cp dashboard/docker-compose.dev.yml /volume1/docker/nas-dashboard/docker-compose.dev.yml
|
|
- name: Deploy dev
|
|
run: |
|
|
set -euo pipefail
|
|
export DOCKER_API_VERSION=1.43
|
|
cd /volume1/docker/nas-dashboard
|
|
docker rm -f nas-dashboard-dev || true
|
|
docker compose -f docker-compose.dev.yml up -d --pull never
|