fix: verify deployment health in Docker host network
Rebuild & Deploy / rebuild (push) Successful in 44s
Rebuild & Deploy / rebuild (push) Successful in 44s
This commit is contained in:
1 parent
3122ca7605
commit
a45569f8c1
3 files changed
+18
-5
No files matched your search
@@ -21,6 +21,10 @@ jobs:
|
||||
bash scripts/deploy-unraid.sh
|
||||
- name: Verify authenticated deployment
|
||||
run: |
|
||||
curl -sf http://127.0.0.1:8092/health -o /dev/null
|
||||
curl -sfk https://127.0.0.1:9178/ -o /dev/null
|
||||
test "$(curl -sk -o /dev/null -w '%{http_code}' -X POST https://127.0.0.1:9178/token)" = 401
|
||||
# CI runner loopback is not the Docker host's loopback.
|
||||
host_curl() {
|
||||
docker run --rm --network host --entrypoint curl hope-voice-api-voice:latest "$@"
|
||||
}
|
||||
host_curl -sf http://127.0.0.1:8092/health -o /dev/null
|
||||
host_curl -sfk https://127.0.0.1:9178/ -o /dev/null
|
||||
test "$(host_curl -sk -o /dev/null -w '%{http_code}' -X POST https://127.0.0.1:9178/token)" = 401
|
||||
Reference in new issue
Block a user