Skip to content

Commit 762017d

Browse files
author
Colin Wahl
committed
add Exec docs
1 parent 8ce59dd commit 762017d

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

docs/02-Core.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Github.Actions.Core
1+
# GitHub.Actions.Core
22

33
> Core functions for setting results, logging, registering secrets and exporting variables across actions
44
5-
This module exposes bindings to the [@actions/core module](https://github.com/actions/toolkit/tree/main/packages/core).
5+
This module exposes bindings to the [@actions/core package](https://github.com/actions/toolkit/tree/main/packages/core).
66

77
## Usage
88

@@ -47,7 +47,7 @@ example = do
4747
You should use this library to set the failing exit code for your action. If status is not set and the script runs to completion, that will lead to a success.
4848

4949
```purescript
50-
task = do stuff that might fail here
50+
task = mempty -- do stuff that might fail here
5151
5252
example = do
5353
case runExceptT task of
@@ -57,7 +57,7 @@ example = do
5757

5858
#### Logging
5959

60-
Finally, this library provides some utilities for logging. Note that debug logging is hidden from the logs by default. This behavior can be toggled by enabling the [Step Debug Logs](../../docs/action-debugging.md#step-debug-logs).
60+
Finally, this library provides some utilities for logging. Note that debug logging is hidden from the logs by default. This behavior can be toggled.
6161

6262
```js
6363
task = do

docs/03-Exec.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# GitHub.Actions.Exec
2+
3+
This module exposes bindings to the [@actions/exec package](https://github.com/actions/toolkit/tree/main/packages/exec).
4+
5+
## Usage
6+
7+
#### Basic
8+
9+
You can use this package to execute tools in a cross platform way:
10+
11+
```purescript
12+
Exec.exec' "node index.js"
13+
```
14+
15+
#### Args
16+
17+
You can also pass in arg arrays:
18+
19+
```purescript
20+
Exec.exec { command: "node", args: Just [ "index.js", "foo=bar" ], options: Nothing }
21+
```
22+
23+
#### Output/options
24+
25+
Capture output or specify other options:
26+
27+
```purescript
28+
Exec.exec { command: "node", args: Just [ "index.js", "foo=bar" ], options: Just (Exec.defaultExecOptions { silent = Just true }) }
29+
```
30+
31+
#### Exec tools not in the PATH
32+
33+
You can specify the full path for tools not in the PATH:
34+
35+
```purescript
36+
Exec.exec { command: "/path/to/my-tool", args: Just [ "arg1"], options: Nothing }
37+
```

0 commit comments

Comments
 (0)