How to use GitHub Actions to create a CI/CD pipeline for your Kestra flows.

We provide two official GitHub Actions to help you create a CI/CD pipeline for your Kestra flows.


In GitHub Actions, CI/CD pipelines are called a Workflow, and is built with Actions performing validation and deployment of your flows.

To use the GitHub Actions, your Kestra installation must be accessible from the GitHub Actions runner. This means that your Kestra server must be accessible from the internet, or that you must use a self-hosted runner.

Kestra Actions

Kestra offers two Actions to create a CI/CD pipeline within a GitHub repository.

Input Reference

Validate Inputs

InputsRequiredDefaultDescription
directory✔️Folder containing your resources
resource✔️Resource you want to update in your namespace, can be flow or template
serverURL of your Kestra server, if none is provided, validation is done locally
userUser for the basic auth
passwordPassword for the basic auth
apiTokenAPI token for EE auth
tenantTenant identifier (EE only, when multi-tenancy is enabled)

Deploy Inputs

InputsRequiredDefaultDescription
namespace✔️Namespace containing your flows and templates
directory✔️Folder containing your resources
resource✔️Resource you want to update in your namespace, can be either flow,template or namespace_files
server✔️URL of your Kestra server
userUser name of your Kestra server
passwordPassword of your Kestra server
deletetrueFlows found in Kestra server, but no longer existing in a specified directory, will be deleted by default. Set this to false if you want to avoid that behavior
tenantTenant identifier (EE only, when multi-tenancy is enabled)
toRemote path indicating where to upload namespace files to

Examples

Here is an example of a Workflow using the Kestra actions to validate all Flows before deploying them.

yaml
name: Kestra CI/CD
on: [push]

jobs:
  validate:
    runs-on: ubuntu-latest
    name: Kestra validate
    steps:
      - name: Checkout repo content
        uses: actions/checkout@v4

      - name: Validate all flows on server-side
        uses: kestra-io/validate-action@develop
        with:
          directory: ./kestra/flows
          resource: flow
          server: server_url

  # If validation passed, deploy resources
  deploy:
    runs-on: ubuntu-latest
    name: Kestra deploy
    steps:
      # We can only deploy to one namespace at once,
      # so we have two different steps for our two namespaces product and engineering
      - name: Checkout repo content
        uses: actions/checkout@v4

      - name: Deploy product flows
        uses: kestra-io/deploy-action@master
        with:
          namespace: product
          directory: ./kestra/flows/product
          resource: flow
          server: server_url

      - name: Deploy engineering flows
        uses: kestra-io/deploy-action@master
        with:
          namespace: engineering
          directory: ./kestra/flows/engineering
          resource: flow
          server: server_url

Check out the How-to Guide for more examples.

Was this page helpful?