Skip to content

Commit d51fb3d

Browse files
committed
Generate examples.yml
1 parent d0c6b31 commit d51fb3d

File tree

1 file changed

+44
-3
lines changed

1 file changed

+44
-3
lines changed

.github/workflows/examples.yml

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# Output from this workflow available here:
1+
# CI output from these examples are available here:
22
# https://github.com/gaggle/elixir_script/actions/workflows/examples.yml?query=branch%3Amain
3+
#
4+
# ℹ️ This file is automatically generated via `mix e2e.update_examples_workflow`
35

46
name: Examples
57

@@ -13,15 +15,54 @@ on:
1315
workflow_dispatch:
1416

1517
jobs:
16-
io-visible-in-logs-and-return-value-available-via-outputs:
18+
scripts-are-run-and-what-it-returns-is-available-via-outputs:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: gaggle/elixir_script@v0
22+
id: script
23+
with:
24+
script: |
25+
defmodule Foo do
26+
def bar, do: "bar"
27+
end
28+
Foo.bar()
29+
30+
- name: Get result
31+
run: echo "${{steps.script.outputs.result}}"
32+
33+
io-is-visible-in-logs:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: gaggle/elixir_script@v0
37+
id: script
38+
with:
39+
script: |
40+
IO.puts("Hello world")
41+
42+
- name: Get result
43+
run: echo "${{steps.script.outputs.result}}"
44+
45+
event-context-is-available:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: gaggle/elixir_script@v0
49+
id: script
50+
with:
51+
script: |
52+
Map.keys(context) |> Enum.sort
53+
54+
- name: Get result
55+
run: echo "${{steps.script.outputs.result}}"
56+
57+
multiline-scripts-are-possible:
1758
runs-on: ubuntu-latest
1859
steps:
1960
- uses: gaggle/elixir_script@v0
2061
id: script
2162
with:
2263
script: |
2364
IO.puts("Hello world")
24-
"return"
65+
"result"
2566
2667
- name: Get result
2768
run: echo "${{steps.script.outputs.result}}"

0 commit comments

Comments
 (0)