| 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.Job.Environment
Description
This module provides the JobEnvironment type for configuring deployment
environments that jobs target in GitHub Actions workflows.
Job environments allow you to: * Target specific deployment environments (production, staging, etc.) * Control access through environment protection rules * Use environment-specific secrets and variables * Track deployment history and status
For more information about GitHub Actions environments, see: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idenvironment
Synopsis
- data JobEnvironment
- gen :: MonadGen m => m JobEnvironment
Documentation
data JobEnvironment Source #
Environment configuration for deployment jobs.
Job environments can be specified in two ways:
NamedJobEnvironment- Reference a named environment by stringCustomJobEnvironment- Configure environment with custom URL and other properties
Named environments are the most common and reference environments configured in your repository settings. Custom environments allow inline configuration for specific deployment scenarios.
Example usage:
import Language.Github.Actions.Job.Environment
import qualified Data.Map as Map
-- Reference a named environment
prodEnvironment :: JobEnvironment
prodEnvironment = NamedJobEnvironment "production"
stagingEnvironment :: JobEnvironment
stagingEnvironment = NamedJobEnvironment "staging"
-- Custom environment with URL
customEnvironment :: JobEnvironment
customEnvironment = CustomJobEnvironment $ Map.fromList
[ ("name", "review-pr-123")
, ("url", "https://pr-123.preview.example.com")
]
For more details, see: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idenvironment
Constructors
| NamedJobEnvironment Text | Reference a named environment |
| CustomJobEnvironment (Map Text Text) | Custom environment configuration |
Instances
gen :: MonadGen m => m JobEnvironment Source #