Skip to content

Commit 48506f8

Browse files
improved readme file
1 parent f9afc7c commit 48506f8

1 file changed

Lines changed: 37 additions & 4 deletions

File tree

README.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ The `stackql/setup-stackql` action is a JavaScript action that sets up StackQL C
99

1010
This action can be run on `ubuntu-latest`, `windows-latest`, and `macos-latest` GitHub Actions runners, and will install and expose the latest version of the `stackql` CLI on the runner environment.
1111

12-
# Auth
12+
# Usage
1313
[Learn more](https://stackql.io/docs/getting-started/authenticating) about authentication setup when running stackql
1414

15-
### Basic Example
15+
## Basic Example
1616
1. Set Auth variable, for example:
1717
```
1818
{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }
@@ -21,8 +21,17 @@ This action can be run on `ubuntu-latest`, `windows-latest`, and `macos-latest`
2121
3. In the execution step, pass the secret as environment variable with name "STACKQL_GITHUB_CREDS"
2222

2323
Check the "Use GitHub Provider" step in `.github/workflows/setup-stackql.yml` for the working example
24+
### Example
25+
```
26+
- name: Use GitHub Provider
27+
run: |
28+
stackql exec -i ./examples/github-example.iql --auth='{ "github": { "type": "basic", "credentialsenvvar": "STACKQL_GITHUB_CREDS" } }'
29+
env:
30+
STACKQL_GITHUB_CREDS: ${{ secrets.STACKQL_GITHUB_CREDS }}
31+
```
32+
2433

25-
### json File Auth example
34+
## json File Auth example
2635

2736
1. Set Auth variable, for example:
2837
```
@@ -31,4 +40,28 @@ Check the "Use GitHub Provider" step in `.github/workflows/setup-stackql.yml` fo
3140
2. encode the key json file into base64 string
3241
3. in execution step, run `sudo echo ${{ secrets.<name of the secret> }} | base64 -d > sa-key.json`
3342

34-
Check the "Prep Google Creds" step in `.github/workflows/setup-stackql.yml` for the working example
43+
Check the "Prep Google Creds" step in `.github/workflows/setup-stackql.yml` for the working example
44+
### Example
45+
```
46+
- name: Prep Google Creds (bash)
47+
if: ${{ matrix.os != 'windows-latest' }}
48+
run: | ## use the secret to create json file
49+
sudo echo ${{ secrets.GOOGLE_CREDS }} | base64 -d > sa-key.json
50+
51+
- name: Use Google Provider
52+
run: |
53+
stackql exec -i ./examples/google-example.iql --auth='{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }}'
54+
```
55+
56+
## Input
57+
- `use_wrapper` - (optional) Whether to install a wrapper to wrap subsequent calls of
58+
the `stackql` binary and expose its STDOUT, STDERR, and exit code as outputs
59+
named `stdout`, `stderr`, and `exitcode` respectively. Defaults to `false`.
60+
61+
## Outputs
62+
This action does not configure any outputs directly. However, when you set the `use_wrapper` input
63+
to `true`, the following outputs are available for subsequent steps that call the `stackql` binary:
64+
65+
- `stdout` - The STDOUT stream of the call to the `stackql` binary.
66+
- `stderr` - The STDERR stream of the call to the `stackql` binary.
67+
- `exitcode` - The exit code of the call to the `stackql` binary.

0 commit comments

Comments
 (0)