Skip to content

runtime-import fails for .github/workflows/* paths (resolved as workflows/*) #18711

@DrPye

Description

@DrPye

Summary

runtime-import fails when importing files from .github/workflows/..., even though the file exists in the checked out repository.

It appears the resolver rewrites or strips the .github path segment and then looks for workflows/..., which does not exist.

It looks like the issue-triage-agent is having the same issue currently in this repo

Reproduction

  1. Create a workflow markdown with:
imports:
  - shared/reporting.md
  1. Compile with gh aw compile (v0.50.5), resulting lock file includes:
{{#runtime-import .github/workflows/shared/reporting.md}}
  1. Run the generated workflow in GitHub Actions.

Actual Result

Interpolation fails with:

ERR_API: Failed to process runtime import for .github/workflows/shared/reporting.md:
ERR_SYSTEM: Runtime import file not found: workflows/shared/reporting.md

Expected Result

runtime-import should resolve .github/workflows/shared/reporting.md exactly as written (or produce a clear validation error during compile if that path is unsupported).

Environment

  • gh aw version: v0.50.5
  • Runner: ubuntu-latest
  • Repo is checked out at ${{ github.workspace }}
  • File exists at .github/workflows/shared/reporting.md in the default branch and in checkout

Notes

Workaround is to avoid runtime imports from .github/... and inline content, but this causes duplication.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions