DevOps Bootcamp · Lesson

Composite Actions and Publishing to the Marketplace

Build composite actions that bundle multiple steps, version them properly, and publish your custom action to the GitHub Marketplace for reuse.

Lesson 4 of 413 steps

Composite Actions and Publishing to the Marketplace is a free DevOps Bootcamp lesson on CoddyKit. This is lesson 4 of 4. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, and your progress syncs across the web and the CoddyKit app. The DevOps Bootcamp course includes 4 lessons in total.

Three Kinds of Custom Actions

GitHub supports three ways to author a custom action:

  • JavaScript actions — run Node code
  • Docker actions — run inside a container
  • Composite actions — bundle multiple workflow steps

This lesson focuses on composite actions and publishing.

What is a Composite Action

A composite action packages several run steps and other action calls into one reusable unit, without writing JavaScript or building a Docker image.

It is ideal for capturing a repeated sequence of shell commands.

The action.yml File

Every action is defined by an action.yml at its root. For a composite action set runs.using to composite.

name: Setup Project
description: Install deps and build
runs:
  using: composite
  steps:
    - run: npm ci
      shell: bash
    - run: npm run build
      shell: bash

Shell is Required

A subtle rule: in composite actions every run step must declare a shell. Forgetting it is the most common error when authoring composites.

    - run: echo 'hello'
      shell: bash

Defining Inputs

Make the action configurable with inputs. Callers pass values via with, and you reference them as inputs.<name>.

inputs:
  node-version:
    description: Node version
    required: false
    default: '20'
runs:
  using: composite
  steps:
    - run: echo Using ${{ inputs.node-version }}
      shell: bash

Defining Outputs

A composite action can return outputs. A step writes to GITHUB_OUTPUT and the action maps it to a named output.

outputs:
  build-id:
    value: ${{ steps.gen.outputs.id }}
runs:
  using: composite
  steps:
    - id: gen
      run: echo "id=$(date +%s)" >> $GITHUB_OUTPUT
      shell: bash

Using a Local Action

You can reference an action stored in the same repo by path, which is great while developing before publishing.

    steps:
      - uses: actions/checkout@v4
      - uses: ./.github/actions/setup-project
        with:
          node-version: '20'

Versioning with Tags

Published actions are referenced by git ref. Best practice: tag releases as v1.0.0 and also maintain a moving v1 tag.

Callers using @v1 automatically get non-breaking updates.

git tag -a v1.0.0 -m 'release'
git tag -f v1
git push --tags --force

Preparing for the Marketplace

To publish to the GitHub Marketplace the action must live in a public repo with an action.yml containing name, description, and ideally branding (icon and color).

branding:
  icon: package
  color: blue

Publishing the Release

On the repo's Releases page, draft a release for your tag. GitHub shows a Publish this Action to the Marketplace checkbox.

Accept the agreement, choose categories, and publish. The action becomes searchable by everyone.

Documenting Usage

A good action ships with a clear README showing a usage example, the inputs, and the outputs.

Enterprises evaluating your action rely heavily on this documentation, so keep it accurate and complete.

Quick Check

Test your understanding of composite actions.

Recap

You learned to build and publish composite actions.

  • Composite actions bundle steps via runs.using: composite
  • Every run step needs an explicit shell
  • Expose inputs and outputs for reuse
  • Tag with semantic versions and a moving major tag, then publish to the Marketplace

Reusable actions are how teams scale shared CI/CD logic.

Free to start

Learn DevOps Bootcamp with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
142
Lessons
568

Frequently Asked Questions

Is the “Composite Actions and Publishing to the Marketplace” lesson free?

Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Composite Actions and Publishing to the Marketplace”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The DevOps Bootcamp course includes 4 lessons in total.

What will I learn in “Composite Actions and Publishing to the Marketplace”?

Build composite actions that bundle multiple steps, version them properly, and publish your custom action to the GitHub Marketplace for reuse. You practise DevOps Bootcamp with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start DevOps Bootcamp?

No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 4 of 4.

How long does the “Composite Actions and Publishing to the Marketplace” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this DevOps Bootcamp lesson?

Yes. Every DevOps Bootcamp lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Developing Custom GitHub Actions
  2. Self-Hosted Runners for On-Premise
  3. Integrating with Enterprise Systems
  4. Composite Actions and Publishing to the Marketplace
← Back to DevOps Bootcamp