Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Setup StackQL](https://github.com/stackql/setup-stackql/actions/workflows/setup-stackql.yml/badge.svg)](https://github.com/stackql/setup-stackql/actions/workflows/setup-stackql.yml)
[![Setup StackQL](https://github.com/stackql/setup-stackql/actions/workflows/setup-stackql-test.yml/badge.svg)](https://github.com/stackql/setup-stackql/actions/workflows/setup-stackql-test.yml)

# setup-stackql

Expand All @@ -13,7 +13,7 @@ Authentication to StackQL providers is done via environment variables source fro
The following example demonstrate the use of the `stackql/setup-stackql` action in a GitHub Actions workflow, demonstrating how to use the action to install the `stackql` CLI and then use it to execute a StackQL query.

### GitHub Example
Check the "Use GitHub Provider" step in [setup-stackql.yml](.github/workflows/setup-stackql.yml) for the working example, for more information on the GitHub provider for StackQL, see the [GitHub Provider Docs](https://registry.stackql.io/github).
Check the "Use GitHub Provider" step in [setup-stackql-test.yml](.github/workflows/setup-stackql-test.yml) for the working example, for more information on the GitHub provider for StackQL, see the [GitHub Provider Docs](https://registry.stackql.io/github).

```yaml
- name: setup StackQL
Expand All @@ -30,7 +30,7 @@ Check the "Use GitHub Provider" step in [setup-stackql.yml](.github/workflows/se
```

### Google Example
Check the "Use Google Provider" step in [setup-stackql.yml](.github/workflows/setup-stackql.yml) for the working example, for more information on the Google provider for StackQL, see the [Google Provider Docs](https://registry.stackql.io/google).
Check the "Use Google Provider" step in [setup-stackql-test.yml](.github/workflows/setup-stackql-test.yml) for the working example, for more information on the Google provider for StackQL, see the [Google Provider Docs](https://registry.stackql.io/google).

```yaml
- name: setup StackQL
Expand All @@ -46,14 +46,14 @@ Check the "Use Google Provider" step in [setup-stackql.yml](.github/workflows/se
```

## Inputs
- `use_wrapper` - (optional) Whether to install a wrapper to wrap subsequent calls of
- __`use_wrapper`__ - (optional) Whether to install a wrapper to wrap subsequent calls of
the `stackql` binary and expose its STDOUT, STDERR, and exit code as outputs
named `stdout`, `stderr`, and `exitcode` respectively. Defaults to `false`.

## Outputs
This action does not configure any outputs directly. However, when you set the `use_wrapper` input
to `true`, the following outputs are available for subsequent steps that call the `stackql` binary:

- `stdout` - The STDOUT stream of the call to the `stackql` binary.
- `stderr` - The STDERR stream of the call to the `stackql` binary.
- `exitcode` - The exit code of the call to the `stackql` binary.
- __`stdout`__ - The STDOUT stream of the call to the `stackql` binary.
- __`stderr`__ - The STDERR stream of the call to the `stackql` binary.
- __`exitcode`__ - The exit code of the call to the `stackql` binary.
12 changes: 6 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6861,19 +6861,19 @@ async function setup() {
core.debug(`path to cli: ${cliPath}`);

// set perms and make executable
if(osPlatform != 'darwin'){
if(osPlatform !== 'darwin'){
core.debug(`updating permissions for ${cliPath}...`);
fs.chmodSync(cliPath, '777');
core.debug(`adding ${cliPath} to the path...`);
core.addPath(cliPath)
await makeExecutable(cliPath, osPlatform)
}

const wrapper = core.getInput('use_wrapper') === 'true';

if(wrapper){
core.info('installing wrapper...')
await installWrapper(cliPath)
// Check if wrapper is needed and if it's not Darwin
const useWrapper = core.getInput('use_wrapper') === 'true';
if(useWrapper && osPlatform !== 'darwin'){
core.info('installing wrapper...');
await installWrapper(cliPath);
}
core.info(`successfully setup stackql at ${cliPath}`);

Expand Down
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,19 @@ async function setup() {
core.debug(`path to cli: ${cliPath}`);

// set perms and make executable
if(osPlatform != 'darwin'){
if(osPlatform !== 'darwin'){
core.debug(`updating permissions for ${cliPath}...`);
fs.chmodSync(cliPath, '777');
core.debug(`adding ${cliPath} to the path...`);
core.addPath(cliPath)
await makeExecutable(cliPath, osPlatform)
}

const wrapper = core.getInput('use_wrapper') === 'true';

if(wrapper){
core.info('installing wrapper...')
await installWrapper(cliPath)
// Check if wrapper is needed and if it's not Darwin
const useWrapper = core.getInput('use_wrapper') === 'true';
if(useWrapper && osPlatform !== 'darwin'){
core.info('installing wrapper...');
await installWrapper(cliPath);
}
core.info(`successfully setup stackql at ${cliPath}`);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "setup-stackql",
"version": "2.2.0",
"version": "2.2.1",
"description": "",
"main": "index.js",
"scripts": {
Expand Down