[GH-ISSUE #5992] Feature Request: Support job-level reusable workflows with relative paths (uses: ./.github/workflows/*.yml) #1311

Open
opened 2026-03-01 21:50:17 +03:00 by kerem · 0 comments
Owner

Originally created by @ravensorb on GitHub (Jan 13, 2026).
Original GitHub issue: https://github.com/nektos/act/issues/5992

Act version

0.2.83

Feature description

Summary

act currently fails schema validation when a workflow job uses a local reusable workflow (relative path). GitHub Actions supports uses: ./.github/workflows/<workflow>.yml at the job level, but act errors before execution with "Unknown Property uses".

Expected Behavior

act should accept and execute workflows that use job-level reusable workflows with relative paths, matching GitHub Actions behavior:

jobs:
  test-in-docker:
    uses: ./.github/workflows/test-docker.yml
    secrets: inherit
    with:
      image_name: docker-apps-cfgmgr:test

Actual Behavior

act fails schema validation with the following error:

Error: workflow is not valid. 'release.yaml': Line: 65 Column 5: Failed to match job-factory: Line: 65 Column 5: Unknown Property uses
Line: 66 Column 5: Unknown Property secrets
Line: 67 Column 5: Unknown Property with
Line: 65 Column 5: Failed to match workflow-job: Line: 74 Column 22: Unknown Variable Access env
Line: 75 Column 21: Unknown Variable Access env
Line: 76 Column 25: Unknown Variable Access env
Actions YAML Schema Validation Error detected

Reproduction Steps

  1. Create a reusable workflow file: .github/workflows/test-docker.yml
name: Test in Docker (Reusable)

on:
  workflow_call:
    inputs:
      image_name:
        description: 'Docker image name for testing'
        required: false
        type: string
        default: 'docker-apps-cfgmgr:test'
      dockerfile:
        description: 'Path to Dockerfile'
        required: false
        type: string
        default: './docker/Dockerfile'
      dockerfile_target:
        description: 'Dockerfile target to build'
        required: false
        type: string
        default: 'test'
    outputs:
      coverage_file:
        description: 'Path to coverage XML file'
        value: ${{ jobs.test.outputs.coverage_file }}
      junit_file:
        description: 'Path to JUnit XML file'
        value: ${{ jobs.test.outputs.junit_file }}

jobs:
  test:
    name: test-in-docker
    runs-on: ubuntu-22.04
    outputs:
      coverage_file: ${{ steps.set-outputs.outputs.coverage_file }}
      junit_file: ${{ steps.set-outputs.outputs.junit_file }}
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Build and test
        run: |
          docker build --target ${{ inputs.dockerfile_target }} -f ${{ inputs.dockerfile }} -t ${{ inputs.image_name }} .
          docker run ${{ inputs.image_name }}

      - name: Set outputs
        id: set-outputs
        run: |
          echo "coverage_file=coverage.xml" >> $GITHUB_OUTPUT
          echo "junit_file=junit.xml" >> $GITHUB_OUTPUT
  1. Create a workflow that uses the reusable workflow: .github/workflows/release.yaml
name: Release Build, Test & Publish

on:
  push:
    tags:
      - '*.*.*'
  workflow_dispatch:

jobs:
  test-in-docker:
    uses: ./.github/workflows/test-docker.yml
    secrets: inherit
    with:
      image_name: docker-apps-cfgmgr:test
      dockerfile: ./docker/Dockerfile
      dockerfile_target: test

  build-and-publish:
    needs: test-in-docker
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      
      - name: Build and push
        run: echo "Building..."
  1. Run act:
act --event tag --tag v1.0.0
  1. Observe the schema validation error before any jobs execute.

Minimal Reproduction Example

File: .github/workflows/test-reusable.yml

name: Test Reusable Workflow

on:
  workflow_call:
    inputs:
      message:
        description: 'Message to print'
        required: false
        type: string
        default: 'Hello from reusable workflow'

jobs:
  test-job:
    runs-on: ubuntu-latest
    steps:
      - name: Print message
        run: echo "${{ inputs.message }}"

File: .github/workflows/main.yml

name: Main Workflow

on:
  workflow_dispatch:

jobs:
  call-reusable:
    uses: ./.github/workflows/test-reusable.yml
    with:
      message: "Hello from main workflow"

Command:

act workflow_dispatch

Expected: Workflow executes successfully
Actual: Schema validation error: Unknown Property uses

Context

This feature is important because:

  1. Reusable workflows are a core GitHub Actions feature - They allow workflows to be modular and DRY (Don't Repeat Yourself)
  2. Local testing is blocked - Developers cannot test workflows locally that use reusable workflows
  3. Even targeting a single job fails - Using act -j <job-name> still validates the entire workflow and fails
  4. Related but distinct from Issue #1875 - Issue #1875 is about nested reusable workflows (a reusable workflow calling another reusable workflow), while this is about job-level reusable workflows in the main workflow

Environment

  • act version: 0.2.83
  • OS: Linux (Ubuntu, kernel 6.14.0-37-generic)
  • Docker version: Docker version 29.1.4, build 0e6fee6

Additional Notes

References

Originally created by @ravensorb on GitHub (Jan 13, 2026). Original GitHub issue: https://github.com/nektos/act/issues/5992 ### Act version 0.2.83 ### Feature description ## Summary `act` currently fails schema validation when a workflow job uses a local reusable workflow (relative path). GitHub Actions supports `uses: ./.github/workflows/<workflow>.yml` at the job level, but `act` errors before execution with "Unknown Property uses". ## Expected Behavior `act` should accept and execute workflows that use job-level reusable workflows with relative paths, matching GitHub Actions behavior: ```yaml jobs: test-in-docker: uses: ./.github/workflows/test-docker.yml secrets: inherit with: image_name: docker-apps-cfgmgr:test ``` ## Actual Behavior `act` fails schema validation with the following error: ``` Error: workflow is not valid. 'release.yaml': Line: 65 Column 5: Failed to match job-factory: Line: 65 Column 5: Unknown Property uses Line: 66 Column 5: Unknown Property secrets Line: 67 Column 5: Unknown Property with Line: 65 Column 5: Failed to match workflow-job: Line: 74 Column 22: Unknown Variable Access env Line: 75 Column 21: Unknown Variable Access env Line: 76 Column 25: Unknown Variable Access env Actions YAML Schema Validation Error detected ``` ## Reproduction Steps 1. Create a reusable workflow file: `.github/workflows/test-docker.yml` ```yaml name: Test in Docker (Reusable) on: workflow_call: inputs: image_name: description: 'Docker image name for testing' required: false type: string default: 'docker-apps-cfgmgr:test' dockerfile: description: 'Path to Dockerfile' required: false type: string default: './docker/Dockerfile' dockerfile_target: description: 'Dockerfile target to build' required: false type: string default: 'test' outputs: coverage_file: description: 'Path to coverage XML file' value: ${{ jobs.test.outputs.coverage_file }} junit_file: description: 'Path to JUnit XML file' value: ${{ jobs.test.outputs.junit_file }} jobs: test: name: test-in-docker runs-on: ubuntu-22.04 outputs: coverage_file: ${{ steps.set-outputs.outputs.coverage_file }} junit_file: ${{ steps.set-outputs.outputs.junit_file }} steps: - name: Checkout repository uses: actions/checkout@v4 - name: Build and test run: | docker build --target ${{ inputs.dockerfile_target }} -f ${{ inputs.dockerfile }} -t ${{ inputs.image_name }} . docker run ${{ inputs.image_name }} - name: Set outputs id: set-outputs run: | echo "coverage_file=coverage.xml" >> $GITHUB_OUTPUT echo "junit_file=junit.xml" >> $GITHUB_OUTPUT ``` 2. Create a workflow that uses the reusable workflow: `.github/workflows/release.yaml` ```yaml name: Release Build, Test & Publish on: push: tags: - '*.*.*' workflow_dispatch: jobs: test-in-docker: uses: ./.github/workflows/test-docker.yml secrets: inherit with: image_name: docker-apps-cfgmgr:test dockerfile: ./docker/Dockerfile dockerfile_target: test build-and-publish: needs: test-in-docker runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@v4 - name: Build and push run: echo "Building..." ``` 3. Run `act`: ```bash act --event tag --tag v1.0.0 ``` 4. Observe the schema validation error before any jobs execute. ## Minimal Reproduction Example **File: `.github/workflows/test-reusable.yml`** ```yaml name: Test Reusable Workflow on: workflow_call: inputs: message: description: 'Message to print' required: false type: string default: 'Hello from reusable workflow' jobs: test-job: runs-on: ubuntu-latest steps: - name: Print message run: echo "${{ inputs.message }}" ``` **File: `.github/workflows/main.yml`** ```yaml name: Main Workflow on: workflow_dispatch: jobs: call-reusable: uses: ./.github/workflows/test-reusable.yml with: message: "Hello from main workflow" ``` **Command:** ```bash act workflow_dispatch ``` **Expected:** Workflow executes successfully **Actual:** Schema validation error: `Unknown Property uses` ## Context This feature is important because: 1. **Reusable workflows are a core GitHub Actions feature** - They allow workflows to be modular and DRY (Don't Repeat Yourself) 2. **Local testing is blocked** - Developers cannot test workflows locally that use reusable workflows 3. **Even targeting a single job fails** - Using `act -j <job-name>` still validates the entire workflow and fails 4. **Related but distinct from Issue #1875** - Issue #1875 is about nested reusable workflows (a reusable workflow calling another reusable workflow), while this is about job-level reusable workflows in the main workflow ## Environment - `act` version: 0.2.83 - OS: Linux (Ubuntu, kernel 6.14.0-37-generic) - Docker version: Docker version 29.1.4, build 0e6fee6 ## Additional Notes - This works correctly in GitHub Actions - This works correctly in Gitea Actions - The error occurs during schema validation, before any workflow execution - The workflow structure is valid according to GitHub Actions documentation: https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow ## References - GitHub Actions Documentation: https://docs.github.com/en/actions/using-workflows/reusing-workflows - Related Issue #1875: https://github.com/nektos/act/issues/1875 (nested reusable workflows - different use case)
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#1311
No description provided.