Skip to content

Commit 2d903f5

Browse files
committed
Update README.md
1 parent 7e26635 commit 2d903f5

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
# ElixirScript
22

3-
**TODO: Add description**
3+
This action makes it easy to quickly write and execute an Elixir script in your workflow.
44

5-
## Installation
5+
To use this action, provide an input named `script` that contains the body of an Elixir function call.
66

7-
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
8-
by adding `elixir_script` to your list of dependencies in `mix.exs`:
7+
The following arguments are available in the script's context:
98

10-
```elixir
11-
def deps do
12-
[
13-
{:elixir_script, "~> 0.1.0"}
14-
]
15-
end
16-
```
9+
* `github` A pre-authenticated [tentacat](https://github.com/edgurgel/tentacat) GitHub client
10+
* `context` A map containing the context of the workflow run
11+
12+
Since the script is just a function body, these values will already be defined, so you don't have to import them.
1713

18-
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
19-
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
20-
be found at <https://hexdocs.pm/elixir_script>.
14+
The return value of the script will be in the step's outputs under the "result" key.
2115

16+
```yaml
17+
- uses: gaggle/elixir_script@v0
18+
id: script
19+
with:
20+
script: <your_elixir_code_here>
21+
22+
- name: Get result
23+
run: echo "${{steps.script.outputs.result}}"
24+
```

0 commit comments

Comments
 (0)