File tree 1 file changed +43
-0
lines changed
1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,49 @@ permissions:
17
17
pull-requests : write
18
18
19
19
jobs :
20
+ output :
21
+ runs-on : " ubuntu-latest"
22
+ steps :
23
+ - uses : actions/checkout@v4
24
+
25
+ - name : " Use output"
26
+ id : use-output
27
+ uses : ./
28
+ with :
29
+ version : latest
30
+ verb : core
31
+ args : container from --address=alpine with-exec --args echo,"hello world" stdout
32
+ - name : " Use output (check)"
33
+ run : |
34
+ target='${{ steps.use-output.outputs.output }}'
35
+ if [[ "$target" == "hello world" ]]; then
36
+ echo "matches"
37
+ exit 0
38
+ else
39
+ echo "does not match"
40
+ exit 1
41
+ fi
42
+
43
+ - name : " Use multiline output"
44
+ id : use-multiline-output
45
+ uses : ./
46
+ with :
47
+ version : latest
48
+ verb : core
49
+ args : container from --address=alpine with-exec --args echo,-e,"hello\nworld" stdout
50
+ - name : " Use output (check)"
51
+ run : |
52
+ target='${{ steps.use-multiline-output.outputs.output }}'
53
+ result='hello
54
+ world'
55
+ if [[ "$target" == "$result" ]]; then
56
+ echo "matches"
57
+ exit 0
58
+ else
59
+ echo "does not match"
60
+ exit 1
61
+ fi
62
+
20
63
version :
21
64
runs-on : " ubuntu-latest"
22
65
steps :
You can’t perform that action at this time.
0 commit comments