From 1a382f18ed10d6965cfaa5f884e5b124b57e6a16 Mon Sep 17 00:00:00 2001 From: Jakob Boghdady <58260820+jakoberpf@users.noreply.github.com> Date: Sat, 8 Jul 2023 16:22:19 +0200 Subject: [PATCH] Update action.yml with missing application type header and verification loop - Adding application type header for json typing - Implementing while loop until authorization completes --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 0ef512b..5893ac6 100644 --- a/action.yml +++ b/action.yml @@ -44,7 +44,7 @@ runs: esac echo "⏁ Authorizing Runner to ZeroTier network" - curl -s -X POST -H "Authorization: token ${{ inputs.auth_token }}" -d '{"config":{"authorized":true}}' "${{ inputs.api_url }}/network/${{ inputs.network_id }}/member/${member_id}" + while ! curl -s -X POST -H "Authorization: token ${{ inputs.auth_token }}" -H "Content-Type: application/json" -d '{"config":{"authorized":true}}' "${{ inputs.api_url }}/network/${{ inputs.network_id }}/member/${member_id}" | grep '"authorized":true' ; do sleep 2 ; done echo "⏁ Joining ZeroTier Network ID: ${{ inputs.network_id }}" case $(uname -s) in