Skip to content

Repository files navigation

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

About

For printing workflow commands in GitHub Actions

Topics

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages