[GH-ISSUE #162] uses: '.' fails with runtime error: index out of range #106

Closed
opened 2026-03-01 21:40:12 +03:00 by kerem · 1 comment
Owner

Originally created by @benjamin-koenig on GitHub (Mar 17, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/162

I have a repository which contains:

  • a github action in the root directory
  • a github workflow for testing

Unfortunately I cannot share this repository as it is private but the problem should be easy to reproduce.

In the workflow I use the action which is located in the repository root.

- name: test action
  uses: '.'
  with:
    ...

Now when I run this workflow using act the build crashes:

[test/build] ⭐  test action
panic: runtime error: index out of range

goroutine 18 [running]:
github.com/nektos/act/pkg/runner.newRemoteAction(0x130c24e, 0x1, 0xc8d1a0)
	/home/runner/work/act/act/pkg/runner/step_context.go:321 +0x211
github.com/nektos/act/pkg/runner.(*StepContext).Executor(0xc0003f0080, 0xcabcdd)
	/home/runner/work/act/act/pkg/runner/step_context.go:60 +0x2fe
github.com/nektos/act/pkg/runner.(*RunContext).newStepExecutor.func1(0xdea3e0, 0xc0003cdb60, 0x0, 0x0)
	/home/runner/work/act/act/pkg/runner/run_context.go:204 +0x349
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003cdb60, 0xdf5ee0, 0xc00035a520)
	/home/runner/work/act/act/pkg/common/executor.go:146 +0x17c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003cdb60, 0x1, 0x0)
	/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.If.func1(0xdea3e0, 0xc0003cdb60, 0xc00035a4b0, 0xa)
	/home/runner/work/act/act/pkg/common/executor.go:154 +0x6a
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1(0xdea3e0, 0xc0003665d0, 0xc0003e39a0, 0xc000060f70)
	/home/runner/work/act/act/pkg/runner/runner.go:74 +0x23a
github.com/nektos/act/pkg/common.Executor.ChannelError.func1(0xdea3e0, 0xc0003665d0, 0xc0003e39a0, 0x0)
	/home/runner/work/act/act/pkg/common/executor.go:125 +0x45
github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0xc0003e3960, 0xc00039e060, 0xdea3e0, 0xc0003665d0)
	/home/runner/work/act/act/pkg/common/executor.go:101 +0x56
created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1
	/home/runner/work/act/act/pkg/common/executor.go:100 +0xb7

My work around is to copy the action to a sub-directory build first and adapt the workflow to use it from there:

- name: test action
  uses: './build'
  with:
    ...

During execution with act you can see that the uses String is used to calculate the Docker image tag. Maybe this is related.

docker build -t act-build:latest <path-to>/build
Originally created by @benjamin-koenig on GitHub (Mar 17, 2020). Original GitHub issue: https://github.com/nektos/act/issues/162 I have a repository which contains: - a github action in the root directory - a github workflow for testing Unfortunately I cannot share this repository as it is private but the problem should be easy to reproduce. In the workflow I use the action which is located in the repository root. ``` - name: test action uses: '.' with: ... ``` Now when I run this workflow using act the build crashes: ``` [test/build] ⭐ test action panic: runtime error: index out of range goroutine 18 [running]: github.com/nektos/act/pkg/runner.newRemoteAction(0x130c24e, 0x1, 0xc8d1a0) /home/runner/work/act/act/pkg/runner/step_context.go:321 +0x211 github.com/nektos/act/pkg/runner.(*StepContext).Executor(0xc0003f0080, 0xcabcdd) /home/runner/work/act/act/pkg/runner/step_context.go:60 +0x2fe github.com/nektos/act/pkg/runner.(*RunContext).newStepExecutor.func1(0xdea3e0, 0xc0003cdb60, 0x0, 0x0) /home/runner/work/act/act/pkg/runner/run_context.go:204 +0x349 github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003cdb60, 0xdf5ee0, 0xc00035a520) /home/runner/work/act/act/pkg/common/executor.go:146 +0x17c github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003cdb60, 0x1, 0x0) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.If.func1(0xdea3e0, 0xc0003cdb60, 0xc00035a4b0, 0xa) /home/runner/work/act/act/pkg/common/executor.go:154 +0x6a github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1(0xdea3e0, 0xc0003665d0, 0xc0003e39a0, 0xc000060f70) /home/runner/work/act/act/pkg/runner/runner.go:74 +0x23a github.com/nektos/act/pkg/common.Executor.ChannelError.func1(0xdea3e0, 0xc0003665d0, 0xc0003e39a0, 0x0) /home/runner/work/act/act/pkg/common/executor.go:125 +0x45 github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0xc0003e3960, 0xc00039e060, 0xdea3e0, 0xc0003665d0) /home/runner/work/act/act/pkg/common/executor.go:101 +0x56 created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1 /home/runner/work/act/act/pkg/common/executor.go:100 +0xb7 ``` My work around is to copy the action to a sub-directory `build` first and adapt the workflow to use it from there: ``` - name: test action uses: './build' with: ... ``` During execution with act you can see that the uses String is used to calculate the Docker image tag. Maybe this is related. ``` docker build -t act-build:latest <path-to>/build ```
kerem closed this issue 2026-03-01 21:40:12 +03:00
Author
Owner

@benjamin-koenig commented on GitHub (Mar 17, 2020):

Never mind.
It now works for me using this syntax:

uses: './'
<!-- gh-comment-id:599977246 --> @benjamin-koenig commented on GitHub (Mar 17, 2020): Never mind. It now works for me using this syntax: ``` uses: './' ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#106
No description provided.