[GH-ISSUE #1673] Local reusable workflows not supported #826

Closed
opened 2026-03-01 21:46:43 +03:00 by kerem · 5 comments
Owner

Originally created by @sylwit on GitHub (Mar 9, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1673

Bug report info

✗ act --bug-report
act version:            0.2.43
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 10
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
        /Users/sylvain/.docker/run/docker.sock
Config files:           
        /Users/sylvain/.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.20.1
        Module path:           command-line-arguments
        Main version:          
        Main path:             
        Main checksum:         
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -X main.version=0.2.43
                CGO_ENABLED:          1
                CGO_CFLAGS:           
                CGO_CPPFLAGS:         
                CGO_CXXFLAGS:         
                CGO_LDFLAGS:          
                GOARCH:               arm64
                GOOS:                 darwin
Docker Engine:
        Engine version:        20.10.21
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:            
        OS arch:               aarch64
        OS kernel:             5.15.49-linuxkit
        OS CPU:                4
        OS memory:             5939 MB
        Security options:
                name=seccomp,profile=default
                name=cgroupns

Command used with act

act workflow_dispatch -e payload.json --container-architecture linux/amd64 -j get_list

Describe issue

If we use a local reusable workflow like

  - uses: ./.github/workflows/test.yml

This won't work probably because of this regexp https://github.com/nektos/act/blob/master/pkg/runner/reusable_workflow.go#L117

The documenation link above mentions 3 different ways to call a reusable workflow

jobs:
call-workflow-1-in-local-repo:
uses: octo-org/this-repo/.github/workflows/workflow-1.yml@172239021f7ba04fe7327647b213799853a9eb89
call-workflow-2-in-local-repo:
uses: ./.github/workflows/workflow-2.yml
call-workflow-in-another-repo:
uses: octo-org/another-repo/.github/workflows/workflow.yml@v1

No response

Workflow content

name: Deploy a release into tst

on:
  workflow_dispatch:
    inputs:
      test:
        type: boolean

jobs:
  get_list:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3    
      - uses: ./.github/workflows/test.yml

Relevant log output

Error: Unable to determine how to run job:get_list step:./.github/workflows/test.yml

Additional information

If I update the workflow with (note the additional ./), this will make the container start, so it fix the parsing.
- uses: ././.github/workflows/test.yml

Originally created by @sylwit on GitHub (Mar 9, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1673 ### Bug report info ```plain text ✗ act --bug-report act version: 0.2.43 GOOS: darwin GOARCH: arm64 NumCPU: 10 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock /Users/sylvain/.docker/run/docker.sock Config files: /Users/sylvain/.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.20.1 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -X main.version=0.2.43 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: arm64 GOOS: darwin Docker Engine: Engine version: 20.10.21 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: aarch64 OS kernel: 5.15.49-linuxkit OS CPU: 4 OS memory: 5939 MB Security options: name=seccomp,profile=default name=cgroupns ``` ### Command used with act ```sh act workflow_dispatch -e payload.json --container-architecture linux/amd64 -j get_list ``` ### Describe issue If we use a local reusable workflow like - uses: ./.github/workflows/test.yml This won't work probably because of this regexp https://github.com/nektos/act/blob/master/pkg/runner/reusable_workflow.go#L117 The documenation link above mentions 3 different ways to call a reusable workflow jobs: call-workflow-1-in-local-repo: uses: octo-org/this-repo/.github/workflows/workflow-1.yml@172239021f7ba04fe7327647b213799853a9eb89 call-workflow-2-in-local-repo: uses: ./.github/workflows/workflow-2.yml call-workflow-in-another-repo: uses: octo-org/another-repo/.github/workflows/workflow.yml@v1 ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Deploy a release into tst on: workflow_dispatch: inputs: test: type: boolean jobs: get_list: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./.github/workflows/test.yml ``` ### Relevant log output ```sh Error: Unable to determine how to run job:get_list step:./.github/workflows/test.yml ``` ### Additional information If I update the workflow with (note the additional ./), this will make the container start, so it fix the parsing. - uses: ././.github/workflows/test.yml
kerem 2026-03-01 21:46:43 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@KnisterPeter commented on GitHub (Mar 9, 2023):

You probably missed to clone your repo

<!-- gh-comment-id:1462751413 --> @KnisterPeter commented on GitHub (Mar 9, 2023): You probably missed to clone your repo
Author
Owner

@sylwit commented on GitHub (Mar 9, 2023):

Sorry I removed too many lines when I pasted my workflow. Updated now with checkout.

act is evaluating steps before starting the workflow so checkout won't help here.

More debugging in the additional info which proves that the regexp seems to be the issue

<!-- gh-comment-id:1462843004 --> @sylwit commented on GitHub (Mar 9, 2023): Sorry I removed too many lines when I pasted my workflow. Updated now with checkout. act is evaluating steps before starting the workflow so checkout won't help here. More debugging in the additional info which proves that the regexp seems to be the issue
Author
Owner

@KnisterPeter commented on GitHub (Mar 9, 2023):

But we are using local reusable workflows.
Please paste all logs and all workflows and all data.
Otherwise debugging will be hard.

<!-- gh-comment-id:1462867376 --> @KnisterPeter commented on GitHub (Mar 9, 2023): But we are using local reusable workflows. Please paste all logs and all workflows and all data. Otherwise debugging will be hard.
Author
Owner

@sylwit commented on GitHub (Mar 9, 2023):

Here is a repo to reproduce it https://github.com/sylwit/act_debug with the logs

Where are you using local reusable workflows ?

<!-- gh-comment-id:1462922652 --> @sylwit commented on GitHub (Mar 9, 2023): Here is a repo to reproduce it https://github.com/sylwit/act_debug with the logs Where are you using local reusable workflows ?
Author
Owner

@sylwit commented on GitHub (Mar 9, 2023):

Found the issue while rerunning your tests. There is no runs-on nor steps in a reusable workflow :(

Thanks for the quick reply @KnisterPeter

<!-- gh-comment-id:1462940874 --> @sylwit commented on GitHub (Mar 9, 2023): Found the issue while rerunning your tests. There is no runs-on nor steps in a reusable workflow :( Thanks for the quick reply @KnisterPeter
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#826
No description provided.