-
Notifications
You must be signed in to change notification settings - Fork 222
Description
Bug Description
When running gh aw compile in a repository whose name ends with .github.io (e.g., username.github.io), the compiled lock file contains an incorrect runtime-import path.
Expected Behavior
The compiled .lock.yml file should contain:
{{#runtime-import .github/workflows/translate-to-ptbr.md}}
Actual Behavior
The compiled .lock.yml file contains:
{{#runtime-import .github.io/.github/workflows/translate-to-ptbr.md}}
The .github.io suffix from the repository name (samueltauil.github.io) is incorrectly prepended to the import path, resulting in:
workflows/.github.io/.github/workflows/translate-to-ptbr.md
This causes the workflow to fail at runtime with:
Failed to process runtime import for .github.io/.github/workflows/translate-to-ptbr.md: Runtime import file not found: workflows/.github.io/.github/workflows/translate-to-ptbr.md
Steps to Reproduce
- Create a repository named
<username>.github.io(a GitHub Pages repo) - Create an agentic workflow markdown file at
.github/workflows/translate-to-ptbr.md - Run
gh aw compile - Inspect the generated
.github/workflows/translate-to-ptbr.lock.yml - Observe the
runtime-importdirective has an incorrect path with.github.io/prefix
Root Cause
It appears the compiler is parsing the repository name and incorrectly extracting a path component from the .github.io suffix in the repo name, then prepending it to the workflow file's import path.
Workaround
Manually edit the compiled .lock.yml file to correct the path from .github.io/.github/workflows/... to .github/workflows/.... Note: this fix will be overwritten on the next gh aw compile.
Environment
- gh-aw version: v0.44.0
- Repository:
samueltauil/samueltauil.github.io - OS: Windows 11