File tree Expand file tree Collapse file tree 4 files changed +25
-17
lines changed Expand file tree Collapse file tree 4 files changed +25
-17
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,14 @@ jobs:
34
34
sudo echo ${{ secrets.GOOGLE_CREDS }} | base64 -d > sa-key.json
35
35
36
36
- name : exec google example with query file
37
- id : exec- stackql-file
37
+ id : stackql-exec -file
38
38
uses : ./
39
39
with :
40
40
auth_obj_path : ' ./stackql_scripts/auth.json'
41
41
query_file_path : ' ./stackql_scripts/google-example.iql'
42
42
43
43
- name : exec github example with query string
44
- id : exec- stackql-string
44
+ id : stackql-exec -string
45
45
uses : ./
46
46
with :
47
47
auth_str : ' { "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
53
53
env :
54
54
STACKQL_GITHUB_CREDS : ${{ secrets.STACKQL_GITHUB_CREDS }}
55
55
56
+ - name : validate stackql-exec output
57
+ shell : bash
58
+ run : |
59
+ if [ -z '${{ steps.stackql-exec-file.outputs.exec-result }}' ]; then
60
+ echo "exec-stackql output does not contain expected result"
61
+ exit 1
62
+ fi
63
+ if [ -z '${{ steps.stackql-exec-string.outputs.exec-result }}' ]; then
64
+ echo "exec-stackql output does not contain expected result"
65
+ exit 1
66
+ fi
67
+
56
68
Original file line number Diff line number Diff line change @@ -86,8 +86,7 @@ where org = 'stackql';
86
86
87
87
## Outputs
88
88
This action uses [ setup-stackql] ( https://github.com/marketplace/actions/stackql-studio-setup-stackql ) , with use_wrapper set
89
- to ` true ` , the following outputs are available for subsequent steps that call the ` stackql ` binary:
89
+ to ` true ` , ` stdout ` and ` stderr ` are set to ` exec-result ` and ` exec-error `
90
90
91
- - ` stdout ` - The STDOUT stream of the call to the ` stackql ` binary.
92
- - ` stderr ` - The STDERR stream of the call to the ` stackql ` binary.
93
- - ` exitcode ` - The exit code of the call to the ` stackql ` binary.
91
+ - ` exec-result ` - The STDOUT stream of the call to the ` stackql ` binary.
92
+ - ` exec-error ` - The STDERR stream of the call to the ` stackql ` binary.
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ inputs:
18
18
description : output format
19
19
default : ' json'
20
20
required : false
21
+ outputs :
22
+ exec-result :
23
+ description : " stdout of stackql command"
24
+ value : ${{ steps.exec-stackql.outputs.stdout }}
25
+ exec-error :
26
+ description : " stderr of stackql command"
27
+ value : ${{ steps.exec-stackql.outputs.stderr }}
21
28
22
29
runs :
23
30
using : " composite"
70
77
shell : bash
71
78
run : |
72
79
${{ env.STACKQL_COMMAND }}
73
-
74
- - name : validate exec-stackql output
75
- shell : bash
76
- run : |
77
- echo "exec-stackql output: ${{ steps.exec-stackql.outputs.stdout }}"
78
- if [ -z ${{ steps.exec-stackql.outputs.stdout }} ]; then
79
- echo "exec-stackql output does not contain expected result"
80
- exit 1
81
- fi
82
-
83
80
84
81
branding :
85
82
icon : ' terminal'
Original file line number Diff line number Diff line change 1
- const { setupAuth, getStackqlCommand } = require ( "../utils" ) ;
1
+ const { setupAuth, getStackqlCommand, setOutput } = require ( "../utils" ) ;
2
2
3
3
describe ( "util" , ( ) => {
4
4
let core ;
You can’t perform that action at this time.
0 commit comments