@@ -219,6 +219,8 @@ if [[ "$MY_MODE" == "delete" ]]; then
219219 exit_with_failure " Failed to get ID of the Hetzner Cloud Server!"
220220 fi
221221
222+ # Send a DELETE request to the Hetzner Cloud API to delete the server.
223+ # https://docs.hetzner.cloud/#servers-delete-a-server
222224 echo " Delete server..."
223225 curl \
224226 -X DELETE \
@@ -229,7 +231,9 @@ if [[ "$MY_MODE" == "delete" ]]; then
229231 || exit_with_failure " Error deleting server!"
230232 echo " Hetzner Cloud Server deleted successfully."
231233
232- echo " List self-hosted runners for repository..."
234+ # List self-hosted runners for repository
235+ # https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#list-self-hosted-runners-for-a-repository
236+ echo " List self-hosted runners..."
233237 curl -L \
234238 --fail-with-body \
235239 -o " github-runners.json" \
@@ -245,7 +249,9 @@ if [[ "$MY_MODE" == "delete" ]]; then
245249 exit_with_failure " Failed to get ID of the GitHub Actions Runner!"
246250 fi
247251
248- echo " Delete GitHub Actions Runner from repository..."
252+ # Delete a self-hosted runner from repository
253+ # https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#delete-a-self-hosted-runner-from-a-repository
254+ echo " Delete GitHub Actions Runner..."
249255 curl -L \
250256 -X DELETE \
251257 --fail-with-body \
269275
270276# Create GitHub Actions registration token for registering a self-hosted runner to a repository
271277# https://docs.github.com/en/rest/actions/self-hosted-runners#create-a-registration-token-for-a-repository
272- echo " Create GitHub Actions Runner registration token for GitHub repository ..."
278+ echo " Create GitHub Actions Runner registration token..."
273279curl -L \
274280 -X " POST" \
275281 --fail-with-body \
@@ -356,6 +362,7 @@ if [[ "$MY_NETWORK" != "null" ]]; then
356362fi
357363
358364# Send a POST request to the Hetzner Cloud API to create a server.
365+ # https://docs.hetzner.cloud/#servers-create-a-server
359366echo " Create server..."
360367if ! curl \
361368 -X POST \
@@ -391,6 +398,7 @@ RETRY_COUNT=0
391398echo " Wait for server..."
392399while [[ $RETRY_COUNT -lt $MAX_RETRIES ]]; do
393400 # Download and parse server status
401+ # https://docs.hetzner.cloud/#servers-get-a-server
394402 curl -s \
395403 -o " servers.json" \
396404 -H " Content-Type: application/json" \
@@ -420,6 +428,8 @@ MAX_RETRIES=$MY_RUNNER_WAIT
420428RETRY_COUNT=0
421429echo " Wait for GitHub Actions Runner registration..."
422430while [[ $RETRY_COUNT -lt $MAX_RETRIES ]]; do
431+ # List self-hosted runners for repository
432+ # https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#list-self-hosted-runners-for-a-repository
423433 curl -L -s \
424434 -o " github-runners.json" \
425435 -H " Accept: application/vnd.github+json" \
0 commit comments