mirror of
https://github.com/actions/runner.git
synced 2025-12-12 05:37:01 +00:00
cr feedback
This commit is contained in:
@@ -7,7 +7,7 @@ set -e
|
|||||||
# The caller should have already ensured the runner is gone and/or stopped
|
# The caller should have already ensured the runner is gone and/or stopped
|
||||||
#
|
#
|
||||||
# Examples:
|
# Examples:
|
||||||
# RUNNER_CFG_PAT=<yourPAT> ./delete.sh myuser/myrepo
|
# RUNNER_CFG_PAT=<yourPAT> ./delete.sh myuser/myrepo myname
|
||||||
# RUNNER_CFG_PAT=<yourPAT> ./delete.sh myorg
|
# RUNNER_CFG_PAT=<yourPAT> ./delete.sh myorg
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
@@ -50,7 +50,7 @@ fi
|
|||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# Ensure offline
|
# Ensure offline
|
||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
runner_status=$(curl -s -X GET ${base_api_url}/${runner_scope}/actions/runners -H "accept: application/vnd.github.everest-preview+json" -H "authorization: token ${RUNNER_CFG_PAT}" \
|
runner_status=$(curl -s -X GET ${base_api_url}/${runner_scope}/actions/runners?per_page=100 -H "accept: application/vnd.github.everest-preview+json" -H "authorization: token ${RUNNER_CFG_PAT}" \
|
||||||
| jq -M -j ".runners | .[] | [select(.name == \"${runner_name}\")] | .[0].status")
|
| jq -M -j ".runners | .[] | [select(.name == \"${runner_name}\")] | .[0].status")
|
||||||
|
|
||||||
if [ -z "${runner_status}" ]; then
|
if [ -z "${runner_status}" ]; then
|
||||||
@@ -66,7 +66,7 @@ fi
|
|||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# Get id of runner to remove
|
# Get id of runner to remove
|
||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
runner_id=$(curl -s -X GET ${base_api_url}/${runner_scope}/actions/runners -H "accept: application/vnd.github.everest-preview+json" -H "authorization: token ${RUNNER_CFG_PAT}" \
|
runner_id=$(curl -s -X GET ${base_api_url}/${runner_scope}/actions/runners?per_page=100 -H "accept: application/vnd.github.everest-preview+json" -H "authorization: token ${RUNNER_CFG_PAT}" \
|
||||||
| jq -M -j ".runners | .[] | [select(.name == \"${runner_name}\")] | .[0].id")
|
| jq -M -j ".runners | .[] | [select(.name == \"${runner_name}\")] | .[0].id")
|
||||||
|
|
||||||
if [ -z "${runner_id}" ]; then
|
if [ -z "${runner_id}" ]; then
|
||||||
|
|||||||
@@ -73,4 +73,4 @@ if [ "${runner_plat}" == "linux" ]; then
|
|||||||
fi
|
fi
|
||||||
${prefix}./svc.sh stop
|
${prefix}./svc.sh stop
|
||||||
${prefix}./svc.sh uninstall
|
${prefix}./svc.sh uninstall
|
||||||
./config.sh remove --token $REMOVE_TOKEN
|
${prefix}./config.sh remove --token $REMOVE_TOKEN
|
||||||
|
|||||||
Reference in New Issue
Block a user