Skip to content

stackql/stackql-deploy-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StackQL Deploy Actions Test StackQL

stackql-deploy

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.

Usage

Provider Authentication

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.

Inputs

  • command - stackql-deploy command to run (build or test)
  • stack_dir - repo directory containing stackql_manifest.yml and resources dir
  • stack_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 file
  • show_queries - (optional) show queries run in the output logs
  • log_level - (optional) set the logging level (INFO or DEBUG, defaults to INFO)
  • dry_run - (optional) perform a dry run of the operation
  • custom_registry - (optional) custom registry URL to be used for stackql
  • on_failure - (optional) action on failure (not implemented yet)

Examples

Deploy a stack

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'