github-workflow-commands: GitHub Actions workflow commands

[ github, library, mit ] [ Propose Tags ]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.0.0, 0.0.1.0
Change log CHANGELOG.md
Dependencies base (>=4.16.4.0 && <5), bytestring (>=0.11.4.0), containers (>=0.6.5.1), lens (>=5.1.1), MonadRandom (>=0.5.3), text (>=1.2.5.0) [details]
License MIT
Author
Maintainer Freckle Education
Category GitHub
Home page https://github.com/freckle/github-workflow-commands#readme
Bug tracker https://github.com/freckle/github-workflow-commands/issues
Source repo head: git clone https://github.com/freckle/github-workflow-commands
Uploaded by PatrickBrisbin at 2024-10-04T17:25:04Z
Distributions
Downloads 31 total (31 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-10-04 [all 1 reports]

Readme for github-workflow-commands-0.0.1.0

[back to package description]

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