Skip to content

uses: $/... self-repository references are rejected #6189

Description

@bennycode

Bug report info

act version:            0.2.89
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 12
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
	$HOME/.docker/run/docker.sock
Config files:
	/Users/<user>/Library/Application Support/act/actrc:
		-P ubuntu-latest=catthehacker/ubuntu:act-latest
		-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
		-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
		-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
	Go version:            go1.26.3
	Module path:           command-line-arguments
	Main version:
	Main path:
	Main checksum:
	Build settings:
		-buildmode:           exe
		-compiler:            gc
		-ldflags:             -X main.version=0.2.89
		DefaultGODEBUG:       cryptocustomrand=1,tlssecpmlkem=0,urlstrictcolons=0
		CGO_ENABLED:          1
		GOARCH:               arm64
		GOOS:                 darwin
		GOARM64:              v8.0
Docker Engine:
	Engine version:        29.5.3
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         cgroupfs
	Storage driver:        overlayfs
	Registry URI:          https://index.docker.io/v1/
	OS:                    Docker Desktop
	OS type:               linux
	OS arch:               aarch64
	OS kernel:             6.12.76-linuxkit
	OS CPU:                12
	OS memory:             7935 MB
	Security options:
		name=seccomp,profile=builtin
		name=cgroupns

Command used with act

act push -W .github/workflows/self-ref-action.yml -P ubuntu-latest=catthehacker/ubuntu:act-latest --container-architecture linux/amd64
act push -W .github/workflows/self-ref-workflow.yml -P ubuntu-latest=catthehacker/ubuntu:act-latest --container-architecture linux/amd64

Describe issue

GitHub Actions added a $/ prefix for uses: that references the repository of the file it appears in, at the running commit. It works for actions (uses: $/path/to/action) and for reusable workflows (uses: $/.github/workflows/file.yml). It was documented in July 2026 (github/docs#62055, now in the workflow syntax reference under jobs.<job_id>.steps[*].uses and jobs.<job_id>.uses).

The docs describe it as:

The $/ prefix is the self repository reference. It references an action stored in the same repository as the workflow or action that is currently running, and resolves to that repository at the running commit (the same SHA as the running workflow or action). You do not need to check out the repository first.

$/ always resolves against the repository of the file it appears in, not the repository that called it. For example, if a reusable workflow in one repository is called by a workflow in another repository, a $/ reference in the called workflow resolves to the called workflow's repository, not the calling workflow's repository.

act 0.2.89 rejects both forms. Step.Type() in pkg/model/workflow.go only knows ./, docker:// and owner/repo@ref, so $/... falls through to the remote-action parser for steps, and the reusable-workflow path check rejects it for jobs.

Expected: both runs succeed, the same as they do on GitHub.

Why it matters: $/ is the first way to make a reusable workflow that calls its own helper actions or sub-workflows work when called from another repository. ./ resolves against the caller's checkout, so shared-workflow repositories are moving to $/, and those workflows can no longer be run locally with act.

Suggested semantics for act:

  • $/.github/workflows/<file>.yml in a job uses: behaves like ./.github/workflows/<file>.yml, resolved against the repository that contains the current workflow file: the working directory for the top-level workflow, or the clone directory for a remote reusable workflow.
  • $/<path> in a step uses: behaves like ./<path> resolved against that same repository root, without requiring a checkout step. Inside a remote composite action it resolves against the action's own repository.

I am happy to work on a pull request if this is welcome.

Link to GitHub repository

Minimal repro is in the workflow content below. A real-world user is n8n-io/github-actions#2, where a reusable workflow fans out to sub-workflows and helper actions via $/.

Workflow content

# .github/workflows/self-ref-action.yml
name: self-ref-action
on: push
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: $/.github/actions/hello

# .github/actions/hello/action.yml
name: Hello
description: Minimal composite action
runs:
  using: composite
  steps:
    - run: echo "hello from $GITHUB_ACTION_PATH"
      shell: bash

# .github/workflows/self-ref-workflow.yml
name: self-ref-workflow
on: push
jobs:
  call:
    uses: $/.github/workflows/called.yml

# .github/workflows/called.yml
name: called
on:
  workflow_call:
jobs:
  inner:
    runs-on: ubuntu-latest
    steps:
      - run: echo "hello from the called workflow"

Relevant log output

# self-ref-action.yml
[self-ref-action/test] 🚀  Start image=catthehacker/ubuntu:act-latest
[self-ref-action/test]   ✅  Success - Set up job
[self-ref-action/test] Expected format {org}/{repo}[/path]@ref. Actual '$/.github/actions/hello' Input string was not in a correct format
[self-ref-action/test] ⭐ Run Complete job
[self-ref-action/test]   ✅  Success - Complete job
[self-ref-action/test] 🏁  Job failed
Error: Expected format {org}/{repo}[/path]@ref. Actual '$/.github/actions/hello' Input string was not in a correct format

# self-ref-workflow.yml
Error: `uses` key references invalid workflow path '$/.github/workflows/called.yml'. Must start with './' if it's a local workflow, or must start with '<org>/<repo>/' and include an '@' if it's a remote workflow

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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