Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
box

GitHub Action

Cake Action

v1.0.0

Cake Action

box

Cake Action

Run a Cake script as part of your build

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Cake Action

uses: cake-build/[email protected]

Learn more about this action in cake-build/cake-action

Choose a version

Cake for GitHub Actions

Build Status Coverage
GitHub Actions Coveralls

This action allows you to run a Cake script from your GitHub Actions workflow without having to use a bootstrapper.

Usage

Using the Cake action from a GitHub Actions workflow is as simple as referencing this repository from a build step:

steps:
  - name: Run the Cake script
    uses: ecampidoglio/cake-action@master

The Cake action will look for a script named build.cake in your repository's root directory and run it for you using the Cake Tool. All output from the Cake script will be automatically redirected to the build log for inspection.

Inputs

script-path

If your script is in another location, you can specify the path with the script-path input parameter:

steps:
  - name: Run the Cake script
    uses: ecampidoglio/cake-action@master
    with:
      script-path: path/to/script.cake

target

You'll likely want to specify which task to run out of the ones defined in the Cake script. For that, you can use the target parameter:

steps:
  - name: Run the Cake script
    uses: ecampidoglio/cake-action@master
    with:
      script-path: path/to/script.cake
      target: Task-To-Run

And that's it. The rest of this document describes the other options that the Cake action supports.

Cross-platform

Since the Cake Tool is built on .NET Core, this action will run on any of the virtual environments supported by GitHub Actions, namely Linux, Windows and macOS.