Skip to content
Latchkey

GitHub Actions composite action cannot define jobs or use in CI

A composite action is a bundle of steps, not a workflow. It declares runs.using: composite and runs.steps. It cannot define jobs:, on:, or workflow_call; those belong to workflows.

What this error means

Loading action.yml fails with an unexpected value or missing property error because it contains jobs:, on:, or a workflow-style structure instead of runs.steps.

GitHub Actions
Error: Unexpected value 'jobs'
# action.yml is a composite action and must use runs.steps, not jobs

Common causes

Workflow structure inside action.yml

The file was written like a workflow with jobs: and on:, but a composite action only supports name, inputs, outputs, and runs.

Confusing composite actions with reusable workflows

Reusable workflows have jobs and workflow_call; composite actions have steps. Mixing the two shapes fails validation.

How to fix it

Use runs.using composite with steps

  1. Replace jobs: with runs.using: composite and runs.steps.
  2. Move each step under runs.steps with a shell for run steps.
  3. Declare inputs and outputs at the top level of action.yml.
action.yml
name: Setup
inputs:
  version:
    required: true
runs:
  using: composite
  steps:
    - run: ./setup.sh ${{ inputs.version }}
      shell: bash

Use a reusable workflow if you need jobs

If you truly need multiple jobs, build a reusable workflow with on.workflow_call instead of a composite action.

.github/workflows/build.yml
on:
  workflow_call:
jobs:
  build:
    runs-on: ubuntu-latest

How to prevent it

  • Use composite actions for shared steps, reusable workflows for shared jobs.
  • Keep action.yml to name, inputs, outputs, and runs.
  • Do not put jobs: or on: in a composite action.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →