github-actions-0.1.1.0: Github Actions
Copyright(c) 2025 Bellroy Pty Ltd
LicenseBSD-3-Clause
MaintainerBellroy Tech Team <haskell@bellroy.com>
Safe HaskellNone
LanguageHaskell2010

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

data Step Source #

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

Instances details
FromJSON Step Source # 
Instance details

Defined in Language.Github.Actions.Step

ToJSON Step Source # 
Instance details

Defined in Language.Github.Actions.Step

Generic Step Source # 
Instance details

Defined in Language.Github.Actions.Step

Methods

from :: Step -> Rep Step x #

to :: Rep Step x -> Step #

Show Step Source # 
Instance details

Defined in Language.Github.Actions.Step

Methods

showsPrec :: Int -> Step -> ShowS #

show :: Step -> String #

showList :: [Step] -> ShowS #

Eq Step Source # 
Instance details

Defined in Language.Github.Actions.Step

Methods

(==) :: Step -> Step -> Bool #

(/=) :: Step -> Step -> Bool #

Ord Step Source # 
Instance details

Defined in Language.Github.Actions.Step

Methods

compare :: Step -> Step -> Ordering #

(<) :: Step -> Step -> Bool #

(<=) :: Step -> Step -> Bool #

(>) :: Step -> Step -> Bool #

(>=) :: Step -> Step -> Bool #

max :: Step -> Step -> Step #

min :: Step -> Step -> Step #

type Rep Step Source # 
Instance details

Defined in Language.Github.Actions.Step

new :: Step Source #

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"
  }