diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index fae73f71..a9707166 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -55,7 +55,14 @@ jobs: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check Wazuh dashboard service URL - run: curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}' + run: | + status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}') + if [[ $status -eq 200 ]]; then + echo "Wazuh dashboard status: ${status}" + else + echo "Wazuh dashboard status: ${status}" + exit 1 + fi - name: Stop single node stack run: docker-compose -f single-node/docker-compose.yml down @@ -99,8 +106,8 @@ jobs: run: | status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}') if [[ $status -eq 200 ]]; then - echo "Wazuh dashboard status: ${nodes}" + echo "Wazuh dashboard status: ${status}" else - echo "Wazuh dashboard status: ${nodes}" + echo "Wazuh dashboard status: ${status}" exit 1 fi \ No newline at end of file