Skip to content

Commit

Permalink
Update module.md
Browse files Browse the repository at this point in the history
  • Loading branch information
frantjc authored Sep 25, 2024
1 parent efa672c commit 6300ad2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Forge can be used as a library as well. Each type of step from a proprietary CI system is represented as an [`Ore`](../ore.go) and live in the package [`ore`](../ore). For example: a GitHub [`Action`](../ore/action.go).

There are a few additional helper `Ore`s: [`Lava`](../ore/lava.go), which pipes the stdout of one ore to the stdin of another; [`Alloy`](../ore/alloy.go), which runs other sequential Ores that will share a working directory; and [`Pure`](../ore/pure.go), which simply runs one containerized command.
There are a few additional helper `Ore`s: [`Lava`](../ore/lava.go), which pipes the stdout of one ore to the stdin of another; [`Alloy`](../ore/alloy.go), which runs other Ores sequentially that will share a working directory; and [`Pure`](../ore/pure.go), which simply runs one containerized command.

In this example, a `Lava` is used to pipe the stdout of a GitHub Action, which is using `actions/checkout` to check out https://github.com/frantjc/forge, to a `Pure` running `grep`, only printing lines that contain the string `"debug"`:

Expand All @@ -23,13 +23,13 @@ func main() {
fmt.Println(err)
os.Exit(1)
}

globalContext := githubactions.NewGlobalContextFromEnv().EnableDebug()
globalContext.GitHubContext.Repository = "frantjc/forge"

// Checkout https://github.com/frantjc/forge
// using https://github.com/actions/checkout,
// grepping to only print debug logs.
// Checkout https://github.com/frantjc/forge
// using https://github.com/actions/checkout,
// grepping to only print debug logs.
if err = forge.NewFoundry(docker.New(cli)).Process(
ctx,
&ore.Lava{
Expand Down

0 comments on commit 6300ad2

Please sign in to comment.