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-import directive 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
Bug Description
When running
gh aw compilein a repository whose name ends with.github.io(e.g.,username.github.io), the compiled lock file contains an incorrectruntime-importpath.Expected Behavior
The compiled
.lock.ymlfile should contain:Actual Behavior
The compiled
.lock.ymlfile contains:The
.github.iosuffix from the repository name (samueltauil.github.io) is incorrectly prepended to the import path, resulting in:This causes the workflow to fail at runtime with:
Steps to Reproduce
<username>.github.io(a GitHub Pages repo).github/workflows/translate-to-ptbr.mdgh aw compile.github/workflows/translate-to-ptbr.lock.ymlruntime-importdirective has an incorrect path with.github.io/prefixRoot Cause
It appears the compiler is parsing the repository name and incorrectly extracting a path component from the
.github.iosuffix in the repo name, then prepending it to the workflow file's import path.Workaround
Manually edit the compiled
.lock.ymlfile to correct the path from.github.io/.github/workflows/...to.github/workflows/.... Note: this fix will be overwritten on the nextgh aw compile.Environment
samueltauil/samueltauil.github.io