Files
runner/instructions.md
2026-01-21 23:19:21 +00:00

58 lines
1.7 KiB
Markdown

## How to demo
Create a new codespace for actions/runner, then
```bash
git pull
git checkout rentziass/dap
```
Then build the runner:
```bash
cd src && ./dev.sh layout && cd ..
```
Then register your runner (grab registration command from [here](https://github.com/organizations/galactic-potatoes/settings/actions/runners/new)):
```bash
cd _layout
```
```
./config.sh --url <REPO_URL> --token <TOKEN> ## the command from above
```
Then start the runner:
```bash
./run.sh
```
### WebSocket Proxy
In a new terminal we need to start the WebSocket proxy:
```bash
cd ./browser-ext/proxy && npm install && node proxy.js
```
After that starts, in VS Code we need to add the port forwarding for port `4712`
(whereas the TCP DAP server will be on `4711`, but we don't need to forward that
one).
### Browser Extension
For this I'd recommend cloning the repo (`gh repo clone actions/runner`) locally
for simplicity, then loading the `browser-ext` folder as an unpacked extension
in Chrome/Edge.
### Debugging a job
Now we want to re-run a failed job for [this workflow](https://github.com/galactic-potatoes/rentziass-test/actions/workflows/self-hosted.yaml) with debug logging enabled. **Once we're on the new job page** we can open the extension and connect. Upon successful connection we'll see steps appear, and clicking the `Debug` button will launch the debugger in page. If anything goes south with connection here simply cancelling the job allows to try again.
> IMPORTANT: after job cleanup is currently broken, after each job make sure to
> open a new terminal in the codespace and run
```bash
cd _layout/_work/rentziass-test/rentziass-test && rm -rf .git .github README.md doesnotexist result
```