fix: add healthz endpoint to nginx image
All checks were successful
Build & Deploy / build (push) Successful in 17s

This commit is contained in:
test
2026-07-19 15:54:10 +08:00
parent 993137b9a2
commit df676c0d18

View File

@@ -28,7 +28,7 @@ jobs:
{
"name": "demo-frontend",
"version": "1.0.0",
"scripts": {"build": "mkdir -p dist && echo '<html><body style=\"font-family:sans-serif;padding:40px;text-align:center\"><h1>Demo Frontend</h1><p>Build: ${SHORT_SHA}</p><p>Commit: ${GITHUB_SHA}</p><p>Time: \$(date)</p></body></html>' > dist/index.html"}
"scripts": {"build": "mkdir -p dist && echo '<html><body style=\"font-family:sans-serif;padding:40px;text-align:center\"><h1>Demo Frontend</h1><p>Build: ${SHORT_SHA}</p><p>Commit: ${GITHUB_SHA}</p><p>Time: $(date)</p></body></html>' > dist/index.html && echo 'OK' > dist/healthz"}
}
EOF
@@ -36,6 +36,7 @@ jobs:
FROM nginx:alpine
COPY dist/ /usr/share/nginx/html/
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s CMD wget -q -O- http://localhost/healthz || exit 1
EOF
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}