diff --git a/util/github-runners-vagrant/README.md b/util/github-runners-vagrant/README.md index 2ea5b3e588..0b93ff6693 100644 --- a/util/github-runners-vagrant/README.md +++ b/util/github-runners-vagrant/README.md @@ -26,8 +26,7 @@ sudo apt purge vagrant-libvirt First, generate a Personal Access Token, which you can create [here](https://github.com/settings/tokens) Make sure to set admin permissions on this token, then replace the of `` in the Vagrantfile with your token. -Next, replace instances of `` with your GitHub account name and the repository name, separated by a forward slash. -For example, if your GitHub account name is `example` and your repository name is `example-repo`, you would replace `` with `example/example-repo`. +Next, replace instances of `` with your GitHub organization you wish to add this runner. ## Install Vagrant Plugins @@ -62,7 +61,7 @@ vagrant up --provider=libvirt ``` This should automatically create your machine, as well as configure and start up a Github Actions runner. -You can check the status of the runner here: https://github.com///settings/actions/runners +You can check the status of the runner here: https://github.com/organizations/{GITHUB_ORG}/settings/actions/runners If the runner ever shows as offline, you can rerun the `vagrant up --provider=libvirt` command to make sure everything is working properly. diff --git a/util/github-runners-vagrant/Vagrantfile b/util/github-runners-vagrant/Vagrantfile index 4bc0b85fd7..0f1eb9ee49 100644 --- a/util/github-runners-vagrant/Vagrantfile +++ b/util/github-runners-vagrant/Vagrantfile @@ -37,10 +37,10 @@ Vagrant.configure("2") do |config| # configure the runner # echo automatically sets the name of the runner, and the tags # create a personal access token with admin permission and copy it into the curl command - echo -ne '\n\nrun\n\n' | ./config.sh --url https://github.com/ --token $(curl -L \ + echo -ne '\n\nrun\n\n' | ./config.sh --url https://github.com/ --token $(curl -L \ -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer " \ -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos//actions/runners/registration-token | jq -r '.token') + https://api.github.com/orgs/${GITHUB_ORG}/actions/runners/registration-token | jq -r '.token') # start the runner nohup ./run.sh & fi