_diag/ and explore workflow workspaces in _work/. We’ll keep the runner process running in one shell while using a second terminal to inspect its file structure in real time.
Table of Contents
- Directory Layout
- Inspecting Diagnostic Logs (
_diag/) - Exploring the Workflow Workspace (
_work/) - Real-Time Diagnostics
- Cleanup
- Summary
- Links and References
1. Directory Layout
Start the runner in one terminal:_diag/: Contains both runner and worker logs._work/: Hosts the workspace where jobs execute.
2. Inspecting Diagnostic Logs (_diag)
Use tree to view the log layout:
If you encounter connectivity or authentication issues, always start with the latest entries in
_diag/pages/Runner_*.log and _diag/pages/Worker_*.log.3. Exploring the Workflow Workspace (_work)
3.1 Before Any Job Runs
By default, the workspace is mostly empty:3.2 Preparing a Long-Running Workflow
To observe changes in_work/ during execution, use a simple workflow that sleeps:
Using
sleep 1500s keeps the job alive long enough to explore file changes. Remember to cancel or stop the runner when done.3.3 Monitoring Job Start
In the runner terminal you’ll see:3.4 After Job Initialization
Re-execute the tree command:3.4.1 PipelineFolder.json
Metadata about your repo and workspace:3.4.2 Generated Shell Script
Yourrun: commands are translated into a shell script:
3.4.3 Workflow Event Payload
The full event that triggered the job lives inevent.json:
3.4.4 Runner File Commands
Commands such as::set-env and ::add-path are materialized into files under runner_file_commands. The runner engine reads these to adjust environment variables, outputs, and step summaries.
4. Real-Time Diagnostics
While the job is running, new logs continuously populate_diag:
5. Cleanup
When you’ve finished inspecting logs and workspace files, stop the runner:6. Summary
_diag/: Central location for runner and worker diagnostics._work/: Contains your repo checkout, generated scripts, event payloads, and runner file commands.- Monitoring these folders in real time is essential for debugging connectivity, authentication, and workflow execution on self-hosted runners.
Links and References
- GitHub Actions: Self-hosted runners
- Workflow syntax for GitHub Actions
- Viewing runner diagnostic logs