Repository navigation
Description
What happens
GitHub Actions supports the self-repository syntax: uses: $/path in a step names an action in the repository of the running workflow, at that workflow's own commit, and uses: $/.github/workflows/<file>.yml does the same for a job-level reusable workflow call (changelog). A $/ reference takes no @ref.
gh aw v1.0.1 refuses both forms, also in a workflow with strict: false:
-
A step with
uses: $/some/action, in the agent job'ssteps, in a custom job or insafe-outputs.jobs, stops the compile with:error: imported steps: unversioned action "$/some/action" has no available pin; add a @ref (e.g. @v1) or include it in action-pins.jsonapplyActionPinToTypedStepinpkg/workflow/action_pins.gopasses only./anddocker://through without a pin. v1.2.1 andmainbehave the same. -
A custom job with
uses: $/.github/workflows/called.ymlfails the action-pin lint rule:CTR-002: [action-pin] Malformed action or reusable-workflow reference; use a repository-relative path, a remote reference pinned to a full commit SHA, or an action image pinned to a digest at jobs.<job>.usesintegrityReferenceinpkg/workflow/lint/integrity.goknows./,docker://andowner/repo@ref. A malformed reference is an error whateverstrictsays, so the only way past it isthreat-detection-suppressfor the whole rule.
Why it matters
A compiled workflow that other repositories call with workflow_call often needs actions from its own repository at its own commit. In a step, ./ names the caller's workspace, a checkout of the calling repository, so it can run a file of the caller with the same path instead of the intended action. $/ is the documented way to reach the called workflow's own repository, also when both repositories are private. A pin to owner/repo@sha works too, but the SHA of a release is only known after the release commit exists, so it cannot be written into the source.
For job-level calls, ./.github/workflows/<file>.yml already resolves to the calling workflow's repository and commit, so there $/ and ./ behave the same in our tests. Accepting $/ keeps one spelling for both levels.
Proposal
- In
applyActionPinToTypedStep, treat auses:that starts with$/like one that starts with./: leave it as written, with no pin lookup and no@ref. - In
integrityReference, accept$/followed by a repository-relative path, with the same path checks as./, and for a reusable workflow the same.github/workflows/<file>.ymlcheck.
How to reproduce
- A workflow
.github/workflows/demo.mdwithon: workflow_call,strict: falseand asteps:entryuses: $/some/action, wheresome/action/action.ymlexists in the repository. - Run
gh aw compile: the first error above. - Replace the step with a custom job
call: { needs: activation, uses: $/.github/workflows/called.yml }, wherecalled.ymlis a plain reusable workflow: the second error above.
Tested with gh aw v1.0.1 on 2026-11-08.
Activity