Skip to content

gh aw compile generates incorrect runtime-import path for repos ending in .github.io #15824

@samueltauil

Description

@samueltauil

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

  1. Create a repository named <username>.github.io (a GitHub Pages repo)
  2. Create an agentic workflow markdown file at .github/workflows/translate-to-ptbr.md
  3. Run gh aw compile
  4. Inspect the generated .github/workflows/translate-to-ptbr.lock.yml
  5. 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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions