Skip to content

fix: create log directory before running agent container (#168)#213

Open
kaixinbaba wants to merge 1 commit into
stephengpope:mainfrom
kaixinbaba:fix/issue-168-run-job-mkdir
Open

fix: create log directory before running agent container (#168)#213
kaixinbaba wants to merge 1 commit into
stephengpope:mainfrom
kaixinbaba:fix/issue-168-run-job-mkdir

Conversation

@kaixinbaba

Copy link
Copy Markdown

Fixes #168

Problem

The run-job.yml workflow fails because the Docker container expects a logs/{JOB_ID} directory to exist on the host volume, but the workflow never creates it. This causes:
Error: ENOENT: no such file or directory, open 'logs/.../stdout.log'

Fix

Add a "Prepare log directory" step before the Docker run step that creates the required directory:

JOB_ID="${GITHUB_REF_NAME#job/}"
mkdir -p "logs/${JOB_ID}"

This ensures the directory exists before the agent container tries to write logs to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run-job.yml

1 participant