diff --git a/.github/workflows/tls.yaml b/.github/workflows/tls.yaml index 478fa0369c..009bbc3f69 100644 --- a/.github/workflows/tls.yaml +++ b/.github/workflows/tls.yaml @@ -29,12 +29,15 @@ jobs: ../scripts/gen_certs.sh htpasswd -bBn test test123 > htpasswd - name: Check for TLS settings - continue-on-error: true run: | cd $GITHUB_WORKSPACE make binary - bin/zot-linux-amd64 serve examples/config-tls.json & + bin/zot-linux-amd64 serve examples/config-tls.json & echo $! > zot.PID sleep 5 + # Check if zot server is running + cat /proc/$(cat zot.PID)/status | grep State || exit 1 + + # zot server is running: proceed to testing curl -kv --tls-max 1.0 -0 https://localhost:8080/v2/ if [[ "$?" -eq 0 ]]; then echo "TLSv1.0 detected"; exit 1; fi curl -kv --tls-max 1.1 -0 https://localhost:8080/v2/ diff --git a/examples/config-tls.json b/examples/config-tls.json index 703c1a3fb4..1c80ad2e02 100644 --- a/examples/config-tls.json +++ b/examples/config-tls.json @@ -8,8 +8,8 @@ "port": "8080", "realm": "zot", "tls": { - "cert": "../../test/data/server.cert", - "key": "../../test/data/server.key" + "cert": "test/data/server.cert", + "key": "test/data/server.key" } }, "log": {