Github Action to execute stackql-deploy
to deploy or test a stack. stackql-deploy
is a declarative, state-file-less IaC framework, based upon stackql
queries.
Authentication to StackQL providers is done via environment variables source from GitHub Actions Secrets. To learn more about authentication, see the setup instructions for your provider or providers at the StackQL Provider Registry Docs.
command
- stackql-deploy command to run (build
ortest
)stack_dir
- repo directory containingstackql_manifest.yml
andresources
dirstack_env
- environment to deploy or test (e.g.,dev
,prod
)env_vars
- (optional) environment variables or secrets imported into a stack (format:KEY=value,KEY2=value2
)env_file
- (optional) environment variables sourced from a fileshow_queries
- (optional) show queries run in the output logslog_level
- (optional) set the logging level (INFO
orDEBUG
, defaults toINFO
)dry_run
- (optional) perform a dry run of the operationcustom_registry
- (optional) custom registry URL to be used for stackqlon_failure
- (optional) action on failure (not implemented yet)
this example shows how to build a stack (examples/k8s-the-hard-way
) for a dev
environment:
...
jobs:
stackql-actions-test:
name: StackQL Actions Test
runs-on: ubuntu-latest
env:
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} # add additional cloud provider creds here as needed
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy a Stack
uses: stackql/[email protected]
with:
command: 'build'
stack_dir: 'examples/k8s-the-hard-way'
stack_env: 'dev'
env_vars: 'GOOGLE_PROJECT=stackql-k8s-the-hard-way-demo'
this example shows how to test stack for a given environment:
...
- name: Test a Stack
uses: stackql/[email protected]
with:
command: 'test'
stack_dir: 'examples/k8s-the-hard-way'
stack_env: 'sit'
env_vars: 'GOOGLE_PROJECT=stackql-k8s-the-hard-way-demo'