Update action.yml with missing application type header and verification loop (#8)

- Adding application type header for json typing
- Implementing while loop until authorization completes
This commit is contained in:
Jakob Boghdady
2023-07-10 13:15:00 +02:00
committed by GitHub
parent cace1e426c
commit cb3d95d448
+1 -1
View File
@@ -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