| Copyright | (c) 2025 Bellroy Pty Ltd |
|---|---|
| License | BSD-3-Clause |
| Maintainer | Bellroy Tech Team <haskell@bellroy.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Language.Github.Actions.Step
Description
This module provides the Step type for representing individual steps within GitHub Actions jobs.
Steps are the individual tasks that make up a job, such as checking out code, running commands,
or using pre-built actions.
A step can either run a command/script or use a pre-built action from the GitHub marketplace or a custom action. Steps run sequentially within a job.
For more information about GitHub Actions step syntax, see: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idsteps
Synopsis
Documentation
A step within a GitHub Actions job.
A step is an individual task within a job. Steps can run commands, scripts, or actions. Each step runs in the runner environment and can use outputs from previous steps.
There are two main types of steps:
* Command steps that use run to execute shell commands
* Action steps that use uses to run a pre-built action
Example usage:
import Language.Github.Actions.Step
-- A command step
commandStep :: Step
commandStep = new
{ name = Just "Run tests"
, run = Just "npm test"
}
-- An action step
actionStep :: Step
actionStep = new
{ name = Just "Checkout code"
, uses = Just "actions/checkout@v4"
}
For more details, see: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idsteps
Constructors
| Step | |
Fields
| |
Instances
Create a new empty Step with default values.
This provides a minimal step that can be extended with specific commands, actions, or other configuration.
Example:
checkoutStep = new
{ name = Just "Checkout repository"
, uses = Just "actions/checkout@v4"
}
commandStep = new
{ name = Just "Build project"
, run = Just "make build"
}