github-workflow-commands

For printing workflow commands in GitHub Actions. See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions


Keywords
library, mit, Propose Tags, https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions, Skip to Readme, , Index, Quick Jump, GitHub.Workflow.Command, GitHub.Workflow.Command.Annotation, GitHub.Workflow.Command.Annotation.Commands.Debug, GitHub.Workflow.Command.Annotation.Commands.Error, GitHub.Workflow.Command.Annotation.Commands.Generic, GitHub.Workflow.Command.Annotation.Commands.Notice, GitHub.Workflow.Command.Annotation.Commands.Warning, GitHub.Workflow.Command.Annotation.File, GitHub.Workflow.Command.Annotation.Location, GitHub.Workflow.Command.Annotation.Position, GitHub.Workflow.Command.Annotation.Position.Column, GitHub.Workflow.Command.Annotation.Position.Columns, GitHub.Workflow.Command.Annotation.Position.Extent, GitHub.Workflow.Command.Annotation.Position.Line, GitHub.Workflow.Command.Annotation.Properties, GitHub.Workflow.Command.Execution, GitHub.Workflow.Command.Grouping, GitHub.Workflow.Command.Masking, GitHub.Workflow.Command.Stopping, GitHub.Workflow.Command.Syntax, GitHub.Workflow.Command.Syntax.Command, GitHub.Workflow.Command.Syntax.Key, GitHub.Workflow.Command.Syntax.Message, GitHub.Workflow.Command.Syntax.Name, GitHub.Workflow.Command.Syntax.Properties, GitHub.Workflow.Command.Syntax.ToByteString, GitHub.Workflow.Command.Syntax.Value, github-workflow-commands-0.0.1.0.tar.gz, browse, Package description, Package maintainers, PatrickBrisbin, edit package information , Workflow commands for GitHub Actions, GitHub Actions Toolkit, CHANGELOG, LICENSE
License
MIT
Install
cabal install github-workflow-commands-0.0.1.0

Documentation

github-workflow-commands

For printing workflow commands in GitHub Actions.

See Workflow commands for GitHub Actions.

The code herein is based on GitHub Actions Toolkit.


import qualified GitHub.Workflow.Command as GH
import Control.Lens ((&), (?~))

An annotation is at minimum just a string.

example1 :: IO ()
example1 =
  GH.executeCommand $
    GH.error "Something failed."

An annotation can also include a location.

someLocation :: GH.Location
someLocation =
  GH.inFile "app.js"
    & GH.position ?~
        ( GH.atLine 13
            & GH.extent ?~ GH.ToLine 16
        )
example2 :: IO ()
example2 =
  GH.executeCommand $
    GH.warning "Something seems amiss here."
      & GH.location ?~ someLocation

CHANGELOG | LICENSE