{"id":16826539,"url":"https://github.com/dlemstra/runner-codespace","last_synced_at":"2025-03-17T19:44:34.659Z","repository":{"id":170409650,"uuid":"646401039","full_name":"dlemstra/runner-codespace","owner":"dlemstra","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-18T21:36:32.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-24T06:48:38.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlemstra.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"dlemstra"}},"created_at":"2023-05-28T09:27:54.000Z","updated_at":"2025-01-18T21:36:34.000Z","dependencies_parsed_at":"2024-02-11T10:24:38.083Z","dependency_job_id":"37ed634d-d90a-415d-91c6-9a0bc6544955","html_url":"https://github.com/dlemstra/runner-codespace","commit_stats":null,"previous_names":["dlemstra/runner-codespace"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlemstra%2Frunner-codespace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlemstra%2Frunner-codespace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlemstra%2Frunner-codespace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlemstra%2Frunner-codespace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlemstra","download_url":"https://codeload.github.com/dlemstra/runner-codespace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244101709,"owners_count":20398376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T11:17:40.511Z","updated_at":"2025-03-17T19:44:34.636Z","avatar_url":"https://github.com/dlemstra.png","language":"Shell","funding_links":["https://github.com/sponsors/dlemstra"],"categories":[],"sub_categories":[],"readme":"# Runner codespace\n\nProvides a Codespace that can be used to browse files and get a shell on a GitHub actions runner.\n\n## Usage\n\nThis project can be used together with:\n\n- [https://github.com/dlemstra/github-actions-debugger](https://github.com/dlemstra/github-actions-debugger)\n\nMore information about that action can be found in the [Readme.md](https://github.com/dlemstra/github-actions-debugger) of that project.\n\n## Start a shell on a runner from this codespace\n\nThis project can also be used to start a shell on an GitHub actions runner. The first step is to start a codespace for this project.\nOnce the codespace is started you can start a shell on a runner by running one the following command:\n\n- start-ubuntu-20\n- start-ubuntu-22\n- start-ubuntu-22-arm\n- start-ubuntu-24\n- start-ubuntu-24-arm\n- start-macos-13\n- start-macos-14\n- start-macos-15\n- start-windows-2022\n- start-windows-2025\n\nThese commands will start a workflow in this project and that require the following secrets to be set in the repository:\n\n`TOKEN_FOR_ACTIONS`: GitHub token with the following permissions: _Full control of private repositories (repo)_.\n\nThis action will start a workflow that will start a runner and tries to connect to codespace of this project. This action requires a secret token with the following name:\n\n`TOKEN_FOR_CODESPACES`: GitHub token with the following permissions: _Full control of codespaces (codespace)_.\n\nOnce the runner is connected to the codespace you will see the following message in the codespace;\n\n![runner-connected](images/runner-connected.png)\n\nThe command that you used to start the runner will also wait for the runner to connect to the codespace. Once the runner is connected a shell will be started on the runner.\n\n```console\n/workspaces/runner-codespace # start-ubuntu\nStarting runner for ubuntu\nWaiting for port 4748 to open |\nWarning: Permanently added '[localhost]:4748' (ED25519) to the list of known hosts.\nrunner@fv-az1766-921:~/work/runner-codespace/runner-codespace$ uname -a\nLinux fv-az1766-921 6.8.0-1014-azure #16~22.04.1-Ubuntu SMP Thu Aug 15 21:31:41 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux\nrunner@fv-az1766-921:~/work/runner-codespace/runner-codespace$\n```\n\nWhen you exit the shell of the runner you can go back to the shell of the codespace by running the `shell` command:\n\n```console\nrunner@fv-az1766-921:~/work/runner-codespace/runner-codespace$ exit\nlogout\nConnection to localhost closed.\n/workspaces/runner-codespace # shell\nWarning: Permanently added '[localhost]:4748' (ED25519) to the list of known hosts.\nrunner@fv-az1766-921:~/work/runner-codespace/runner-codespace$\n```\n\n### Stop the runner that is connection to the codespace\n\nOnce you are done with the runner you can disconnect from the runner by running the `exit` command. You can then stop the runner by running the `stop-runner` command:\n\n```console\nrunner@fv-az1766-921:~/work/runner-codespace/runner-codespace$ exit\nlogout\nConnection to localhost closed.\n/workspaces/runner-codespace # stop-runner\n/workspaces/runner-codespace #\n```\n\n### Stop the codespace of this project\n\nOnce you are done with the codespace of this project you can stop it by running the `stop-codespace` command:\n\n```console\n/workspaces/runner-codespace # stop-codespace\n/workspaces/runner-codespace #\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlemstra%2Frunner-codespace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlemstra%2Frunner-codespace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlemstra%2Frunner-codespace/lists"}