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

Description

This module provides the Job type for representing individual jobs within GitHub Actions workflows. Jobs are collections of steps that execute on the same runner.

A job defines the environment, dependencies, and steps that should be executed as part of a workflow. Jobs can run in parallel or be configured to depend on other jobs.

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

Synopsis

Documentation

data Job Source #

A job within a GitHub Actions workflow.

A job is a set of steps that execute on the same runner. Jobs can run in parallel or sequentially depending on their dependencies. Each job runs in its own virtual environment specified by the runner.

Example usage:

import Language.Github.Actions.Job
import qualified Language.Github.Actions.Step as Step

myJob :: Job
myJob = new
 { jobName = Just "Build and Test"
 , runsOn = Just "ubuntu-latest"
 , steps = Just $ Step.new :| []
 }

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

Constructors

Job 

Fields

Instances

Instances details
FromJSON Job Source # 
Instance details

Defined in Language.Github.Actions.Job

ToJSON Job Source # 
Instance details

Defined in Language.Github.Actions.Job

Generic Job Source # 
Instance details

Defined in Language.Github.Actions.Job

Associated Types

type Rep Job 
Instance details

Defined in Language.Github.Actions.Job

type Rep Job = D1 ('MetaData "Job" "Language.Github.Actions.Job" "github-actions-0.1.1.0-BjHhRMO6iQ17qdsNXwhDab" 'False) (C1 ('MetaCons "Job" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "concurrency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Concurrency)) :*: S1 ('MetaSel ('Just "container") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JobContainer))) :*: (S1 ('MetaSel ('Just "continueOnError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "defaults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Defaults)))) :*: ((S1 ('MetaSel ('Just "env") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text)) :*: S1 ('MetaSel ('Just "environment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JobEnvironment))) :*: (S1 ('MetaSel ('Just "jobName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "needs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JobNeeds)) :*: S1 ('MetaSel ('Just "outputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text)))))) :*: (((S1 ('MetaSel ('Just "permissions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Permissions)) :*: S1 ('MetaSel ('Just "runIf") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe RunIf))) :*: (S1 ('MetaSel ('Just "runsOn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "secrets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text)) :*: S1 ('MetaSel ('Just "services") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map ServiceId Service))))) :*: ((S1 ('MetaSel ('Just "steps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Step))) :*: S1 ('MetaSel ('Just "strategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JobStrategy))) :*: (S1 ('MetaSel ('Just "timeoutMinutes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "uses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "with") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text))))))))

Methods

from :: Job -> Rep Job x #

to :: Rep Job x -> Job #

Show Job Source # 
Instance details

Defined in Language.Github.Actions.Job

Methods

showsPrec :: Int -> Job -> ShowS #

show :: Job -> String #

showList :: [Job] -> ShowS #

Eq Job Source # 
Instance details

Defined in Language.Github.Actions.Job

Methods

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

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

Ord Job Source # 
Instance details

Defined in Language.Github.Actions.Job

Methods

compare :: Job -> Job -> Ordering #

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

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

(>) :: Job -> Job -> Bool #

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

max :: Job -> Job -> Job #

min :: Job -> Job -> Job #

type Rep Job Source # 
Instance details

Defined in Language.Github.Actions.Job

type Rep Job = D1 ('MetaData "Job" "Language.Github.Actions.Job" "github-actions-0.1.1.0-BjHhRMO6iQ17qdsNXwhDab" 'False) (C1 ('MetaCons "Job" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "concurrency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Concurrency)) :*: S1 ('MetaSel ('Just "container") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JobContainer))) :*: (S1 ('MetaSel ('Just "continueOnError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "defaults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Defaults)))) :*: ((S1 ('MetaSel ('Just "env") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text)) :*: S1 ('MetaSel ('Just "environment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JobEnvironment))) :*: (S1 ('MetaSel ('Just "jobName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "needs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JobNeeds)) :*: S1 ('MetaSel ('Just "outputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text)))))) :*: (((S1 ('MetaSel ('Just "permissions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Permissions)) :*: S1 ('MetaSel ('Just "runIf") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe RunIf))) :*: (S1 ('MetaSel ('Just "runsOn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "secrets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text)) :*: S1 ('MetaSel ('Just "services") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map ServiceId Service))))) :*: ((S1 ('MetaSel ('Just "steps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (NonEmpty Step))) :*: S1 ('MetaSel ('Just "strategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JobStrategy))) :*: (S1 ('MetaSel ('Just "timeoutMinutes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "uses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "with") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text))))))))

gen :: MonadGen m => m Job Source #

new :: Job Source #

Create a new empty Job with default values.

This provides a minimal job that can be extended with specific steps, runner configuration, and other settings.

Example:

buildJob = new
  { jobName = Just Build
  , runsOn = Just "ubuntu-latest"
  , steps = Just $ checkoutStep :| [buildStep]
  }