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

Description

This module provides the core Workflow type for representing GitHub Actions workflows, along with JSON serialization/deserialization and generation utilities.

GitHub Actions workflows are defined in YAML files that specify automated processes triggered by events in a GitHub repository. This module provides a type-safe way to construct and serialize these workflows.

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

Synopsis

Documentation

data Workflow Source #

A GitHub Actions workflow definition.

A workflow defines automated processes that run in response to events in your repository. Workflows are defined in YAML files stored in the .github/workflows directory.

Example usage:

import Language.Github.Actions.Workflow
import qualified Language.Github.Actions.Job as Job
import qualified Language.Github.Actions.Job.Id as JobId

myWorkflow :: Workflow
myWorkflow = new
 { workflowName = Just CI
 , jobs = Map.singleton (JobId "build") Job.new
 , on = Set.singleton pushTrigger
 }

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

Constructors

Workflow 

Fields

Instances

Instances details
FromJSON Workflow Source # 
Instance details

Defined in Language.Github.Actions.Workflow

ToJSON Workflow Source # 
Instance details

Defined in Language.Github.Actions.Workflow

Generic Workflow Source # 
Instance details

Defined in Language.Github.Actions.Workflow

Methods

from :: Workflow -> Rep Workflow x #

to :: Rep Workflow x -> Workflow #

Show Workflow Source # 
Instance details

Defined in Language.Github.Actions.Workflow

Eq Workflow Source # 
Instance details

Defined in Language.Github.Actions.Workflow

Ord Workflow Source # 
Instance details

Defined in Language.Github.Actions.Workflow

type Rep Workflow Source # 
Instance details

Defined in Language.Github.Actions.Workflow

new :: Workflow Source #

Create a new empty Workflow with default values.

This provides a minimal workflow that can be extended with specific jobs, triggers, and other configuration.

Example:

myWorkflow = new
  { workflowName = Just "My Workflow"
  , jobs = Map.singleton (JobId "test") Job.new
  , on = Set.singleton (PushTrigger pushTriggerDefaults)
  }