diff --git a/README.md b/README.md index afd37a8..94513f3 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ module "aws_ecs_github_runner" { runners = { runner_1 = { org = "My_Org" - repository = "repo" labels = "aws,ecs,private" } runner_2 = { diff --git a/docker-src/scripts/start.sh b/docker-src/scripts/start.sh index 2a37b22..2e481aa 100644 --- a/docker-src/scripts/start.sh +++ b/docker-src/scripts/start.sh @@ -1,7 +1,6 @@ #!/bin/bash GH_OWNER=$GH_OWNER -GH_REPOSITORY=$GH_REPOSITORY GH_TOKEN=$GH_TOKEN LABELS=$LABELS @@ -10,11 +9,11 @@ RUNNER_NAME="${RUNNER_PREFIX}-${RUNNER_SUFFIX}" echo "Configuring runner ${RUNNER_NAME}..." -REG_TOKEN=$(curl -sX POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${GH_TOKEN}" https://api.github.com/repos/${GH_OWNER}/${GH_REPOSITORY}/actions/runners/registration-token | jq .token --raw-output) +REG_TOKEN=$(curl -sX POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${GH_TOKEN}" https://api.github.com/orgs/${GH_OWNER}/actions/runners/registration-token | jq .token --raw-output) cd /home/docker/actions-runner -./config.sh --unattended --url https://github.com/${GH_OWNER}/${GH_REPOSITORY} \ +./config.sh --unattended --url https://github.com/${GH_OWNER} \ --token ${REG_TOKEN} \ --name ${RUNNER_NAME} \ --labels "${LABELS:-default}" \ diff --git a/main.tf b/main.tf index 2642ff3..a581678 100644 --- a/main.tf +++ b/main.tf @@ -167,10 +167,6 @@ resource "aws_ecs_task_definition" "runner" { "name" : "GH_OWNER", "value" : "${each.value.org}" }, - { - "name" : "GH_REPOSITORY", - "value" : "${each.value.repository}" - }, { "name" : "LABELS", "value" : "${each.value.labels}" diff --git a/variables.tf b/variables.tf index 20f9be5..ad66dcc 100644 --- a/variables.tf +++ b/variables.tf @@ -35,7 +35,6 @@ variable "secret_arn_override" { variable "runners" { type = map(object({ org = string - repository = optional(string) labels = optional(string) runner_prefix = optional(string) }))