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.With

Description

This module provides the StepWith type for specifying input parameters to GitHub Actions steps that use pre-built actions.

The with keyword allows you to pass inputs to actions, which can be: * Environment variables for the action * Docker container arguments (for Docker actions) * Configuration parameters specific to the action

For more information about GitHub Actions step inputs, see: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstepswith

Synopsis

Documentation

data StepWith Source #

Input parameters for GitHub Actions steps.

Step inputs can be specified in two main ways:

  • StepWithDockerArgs - For Docker actions that need entry point and arguments
  • StepWithEnv - For actions that accept environment variables or general inputs

Most actions use the environment variable format, where inputs are passed as key-value pairs.

Example usage:

import Language.Github.Actions.Step.With
import qualified Data.Map as Map

-- Environment inputs for actions/checkout
checkoutInputs :: StepWith
checkoutInputs = StepWithEnv $ Map.fromList
 [ ("repository", "owner/repo")
 , ("ref", "main")
 , ("token", "${{ secrets.GITHUB_TOKEN }}")
 ]

-- Docker action inputs
dockerInputs :: StepWith
dockerInputs = StepWithDockerArgs $ StepWithDockerArgsAttrs
 { entryPoint = "/entrypoint.sh"
 , args = Just "arg1 arg2"
 }

-- Action inputs for actions/upload-artifact
uploadInputs :: StepWith
uploadInputs = StepWithEnv $ Map.fromList
 [ ("name", "build-artifacts")
 , ("path", "dist/")
 , ("retention-days", "30")
 ]

For more details, see: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstepswith

Constructors

StepWithDockerArgs StepWithDockerArgsAttrs

Docker action arguments

StepWithEnv UnstructuredMap

Environment variables/general inputs

Instances

Instances details
FromJSON StepWith Source # 
Instance details

Defined in Language.Github.Actions.Step.With

ToJSON StepWith Source # 
Instance details

Defined in Language.Github.Actions.Step.With

Generic StepWith Source # 
Instance details

Defined in Language.Github.Actions.Step.With

Associated Types

type Rep StepWith 
Instance details

Defined in Language.Github.Actions.Step.With

Methods

from :: StepWith -> Rep StepWith x #

to :: Rep StepWith x -> StepWith #

Show StepWith Source # 
Instance details

Defined in Language.Github.Actions.Step.With

Eq StepWith Source # 
Instance details

Defined in Language.Github.Actions.Step.With

Ord StepWith Source # 
Instance details

Defined in Language.Github.Actions.Step.With

type Rep StepWith Source # 
Instance details

Defined in Language.Github.Actions.Step.With