https://github.com/freckle/github-workflow-commands
For printing workflow commands in GitHub Actions
https://github.com/freckle/github-workflow-commands
ghvm-managed
Last synced: about 1 year ago
JSON representation
For printing workflow commands in GitHub Actions
- Host: GitHub
- URL: https://github.com/freckle/github-workflow-commands
- Owner: freckle
- License: mit
- Created: 2024-07-03T00:57:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-21T22:32:46.000Z (about 1 year ago)
- Last Synced: 2025-05-02T20:04:30.778Z (about 1 year ago)
- Topics: ghvm-managed
- Language: Haskell
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.lhs
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# github-workflow-commands
For printing workflow commands in GitHub Actions.
See [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions).
The code herein is based on [GitHub Actions Toolkit](https://github.com/actions/toolkit/tree/main/packages/core/src).
---
```haskell
import qualified GitHub.Workflow.Command as GH
import Control.Lens ((&), (?~))
```
An annotation is at minimum just a string.
```haskell
example1 :: IO ()
example1 =
GH.executeCommand $
GH.error "Something failed."
```
An annotation can also include a location.
```haskell
someLocation :: GH.Location
someLocation =
GH.inFile "app.js"
& GH.position ?~
( GH.atLine 13
& GH.extent ?~ GH.ToLine 16
)
```
```haskell
example2 :: IO ()
example2 =
GH.executeCommand $
GH.warning "Something seems amiss here."
& GH.location ?~ someLocation
```
---
[CHANGELOG](./CHANGELOG.md) | [LICENSE](./LICENSE)