Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
734bb65
added setup auth function
yunchengyang515 Jan 22, 2023
1c5fddf
added setup auth function
yunchengyang515 Jan 22, 2023
145ad07
debug setup auth error
yunchengyang515 Jan 22, 2023
ca6ad1b
debug setup auth error
yunchengyang515 Jan 22, 2023
57309dc
debug setup auth error
yunchengyang515 Jan 22, 2023
153d561
debug setup auth error
yunchengyang515 Jan 22, 2023
0020138
debug setup auth error
yunchengyang515 Jan 22, 2023
193cbd8
move the input to correct step
yunchengyang515 Jan 22, 2023
fca8cb7
imporve error message
yunchengyang515 Jan 22, 2023
9b19a15
require auth string
yunchengyang515 Jan 22, 2023
6964799
testing what happen without the org
yunchengyang515 Jan 22, 2023
8260e0a
testing what happen without the org
yunchengyang515 Jan 22, 2023
cb77fcd
testing what happen without the org
yunchengyang515 Jan 22, 2023
62f99c3
remove quotes
yunchengyang515 Jan 22, 2023
d153b5d
try if need to set as env instead
yunchengyang515 Jan 22, 2023
d371073
try if need to set as env instead
yunchengyang515 Jan 22, 2023
88b41bd
try imporve result logging
yunchengyang515 Jan 22, 2023
0053201
added pull github setp in test workflow
yunchengyang515 Jan 22, 2023
c69af41
added pull github setp in test workflow
yunchengyang515 Jan 22, 2023
7eb7dfe
try to use a iql script;
yunchengyang515 Jan 22, 2023
ad26b7d
try to use a iql script;
yunchengyang515 Jan 22, 2023
c6780ed
try to use a iql script;
yunchengyang515 Jan 22, 2023
e8bbaf8
try to use private resource
yunchengyang515 Jan 22, 2023
55c069f
change the script based on updated doc
yunchengyang515 Jan 22, 2023
3fcab73
slight name change
yunchengyang515 Jan 22, 2023
d521afd
remove setup auth in aciton, use github vars and secrets instead
yunchengyang515 Jan 22, 2023
71aaf6b
fix wrong env var name
yunchengyang515 Jan 22, 2023
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
12 changes: 10 additions & 2 deletions .github/workflows/set-up-stackql.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Setup Terraform'
name: 'Setup StackQL'

on:
push:
Expand All @@ -23,6 +23,14 @@ jobs:
- name: Setup stackql
uses: ./


- name: Validate Stackql Version
run: |
stackql --version
stackql --version

- name: Use GitHub Provider
run: |
stackql exec -i ./examples/get-github-commits.iql --auth="${AUTH}"
env:
AUTH: ${{ vars.AUTH }}
STACKQL_GITHUB_CREDS: ${{ secrets.STACKQL_GITHUB_CREDS }}
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# setup-stackql

The `stackql/setup-stackql` action is a JavaScript action that sets up Terraform CLI in your GitHub Actions workflow by:

- Downloading a latest Stackql CLI and adding it to the `PATH`.
- Setup AUTH env var in the Github Action

## Auth object string
Example
```
{
"google": { "credentialsfilepath": "creds/stackql-demo.json", "type": "service_account" },
"okta": { "credentialsenvvar": "OKTA_SECRET_KEY", "type": "api_key", credentials: '<your credentials>' }
}
```

13 changes: 2 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
name: 'StackQL Studio - Setup StackQL'
description: 'Sets up StackQL CLI in your GitHub Actions workflow.'
author: 'Yuncheng Yang, StackQL'
inputs:
platform:
description: 'Platform that function is running on'
required: false
# authentications_object_string:
# description: 'The authentication object'
# required: true
# stackql_wrapper:
# description: 'Whether or not 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 `true`.'
# default: 'true'
# required: false


runs:
using: 'node16'
main: 'dist/index.js'
Expand Down
5 changes: 5 additions & 0 deletions examples/get-github-commits.iql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REGISTRY PULL github v23.01.00104;
SHOW PROVIDERS;
select total_private_repos
from github.orgs.orgs
where org = 'stackql';