mirror of
https://github.com/actions/runner.git
synced 2025-12-11 12:57:05 +00:00
markdown
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
## Latest Release as Service on Nix VMs
|
## Latest Release as Service on Nix VMs
|
||||||
|
|
||||||
[Run or copy this script for your use](../scripts/latest-svc.sh) to automate configuring a runner as a service on Linux or Mac
|
[Run or copy this script for your use](../scripts/create-latest-svc.sh) to automate configuring a runner as a service on Linux or Mac
|
||||||
|
|
||||||
### Step 1: export PAT
|
### Export PAT
|
||||||
|
|
||||||
Create a GitHub PAT and export it before running the script
|
Create a GitHub PAT and export it before running the script
|
||||||
|
|
||||||
@@ -12,15 +12,16 @@ Create a GitHub PAT and export it before running the script
|
|||||||
export RUNNER_CFG_PAT=yourPAT
|
export RUNNER_CFG_PAT=yourPAT
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 2: config one liner
|
### Ceate service one liner
|
||||||
|
|
||||||
Repo level one liner; replace yourorg/yourrepo
|
Repo level one liner; replace with yourorg/yourrepo (repo level) or just yourorg (org level)
|
||||||
```bash
|
```bash
|
||||||
curl https://raw.githubusercontent.com/actions/runner/automate/scripts/latest-svc.sh | bash -s yourorg/yourrepo
|
curl https://raw.githubusercontent.com/actions/runner/automate/scripts/create-latest-svc.sh | bash -s yourorg/yourrepo
|
||||||
```
|
```
|
||||||
|
|
||||||
Org level one liner; replace yourorg
|
### Uninstall service one liner
|
||||||
|
|
||||||
|
Repo level one liner; replace with yourorg/yourrepo (repo level) or just yourorg (org level)
|
||||||
```bash
|
```bash
|
||||||
curl https://raw.githubusercontent.com/actions/runner/automate/scripts/latest-svc.sh | bash -s yourorg
|
curl https://raw.githubusercontent.com/actions/runner/automate/scripts/remove-svc.sh | bash -s yourorg/yourrepo
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ 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}" | jq -M -j ".runners | .[] | [select(.name == \"${runner_name}\")] | .[0].id")
|
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}" \
|
||||||
|
| jq -M -j ".runners | .[] | [select(.name == \"${runner_name}\")] | .[0].id")
|
||||||
|
|
||||||
if [ -z "${runner_id}" ]; then
|
if [ -z "${runner_id}" ]; then
|
||||||
fatal "Could not find runner with name ${runner_name}"
|
fatal "Could not find runner with name ${runner_name}"
|
||||||
|
|||||||
Reference in New Issue
Block a user