Skip to content

gh aw compile creates actions-lock.json relative to CWD instead of repository root #14722

@brunoborges

Description

@brunoborges

Running gh aw compile <workflow>.md from a subdirectory (e.g., .github/workflows/) creates the .github/aw/actions-lock.json file relative to the current working directory instead of the repository root, resulting in a duplicate nested directory structure.

Steps to Reproduce

  1. Navigate to .github/workflows/ inside a repository:
    cd .github/workflows/
  2. Run:
    gh aw compile weekly-upstream-sync.md

Expected Behavior

The actions-lock.json file should be written to <repo-root>/.github/aw/actions-lock.json, regardless of the current working directory.

Actual Behavior

The file is written to <cwd>/.github/aw/actions-lock.json, which when run from .github/workflows/ creates:

.github/workflows/.github/aw/actions-lock.json

This duplicates the directory structure as a subfolder of the current directory.

Workaround

Run the command from the repository root:

gh aw compile .github/workflows/weekly-upstream-sync.md

Environment

  • OS: macOS (ARM64)

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