GitHub Actions​Git​Hub ​Actions

Use GitHub Actions to automate the validation and deployment of your Kestra flows.

Overview

Kestra provides two official GitHub Actions that let you build a CI/CD pipeline directly within your GitHub repository. These actions allow you to validate and deploy flows automatically every time you push updates to your version control system.

In GitHub Actions, CI/CD pipelines are called Workflows — sequences of Actions that execute validation and deployment steps.
To use these Actions, your Kestra instance must be accessible to the GitHub Actions runner — either publicly over the internet or through a self-hosted runner within your network.


Official Kestra Actions

Kestra provides two dedicated Actions to integrate with GitHub CI/CD pipelines:


Input Reference

Validate Action Inputs

InputRequiredDefaultDescription
directoryFolder containing your resources.
resourceResource type to validate — flow or template.
serverURL of your Kestra server. If omitted, validation runs locally.
userUsername for basic authentication.
passwordPassword for basic authentication.
apiTokenAPI token for Enterprise Edition authentication.
tenantTenant identifier (Enterprise Edition only).

Deploy Action Inputs

InputRequiredDefaultDescription
namespaceNamespace containing your flows and templates.
directoryFolder containing your resources.
resourceResource type to deploy — flow, template, or namespace_files.
serverURL of your Kestra server.
userUsername for basic authentication.
passwordPassword for basic authentication.
deletetrueIf true, flows not found in the directory will be deleted from the server. Set to false to preserve them.
tenantTenant identifier (Enterprise Edition only).
toRemote path where namespace files should be uploaded.

Example Workflow

The following GitHub Actions workflow validates all flows and then deploys them to multiple namespaces when changes are pushed to the repository.

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

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

      - name: Validate flows on server-side
        uses: kestra-io/validate-action@develop
        with:
          directory: ./kestra/flows
          resource: flow
          server: ${{ secrets.KESTRA_HOSTNAME }}

  deploy:
    runs-on: ubuntu-latest
    name: Deploy Kestra flows
    needs: validate
    steps:
      - name: Checkout repository content
        uses: actions/checkout@v4

      # Deploy to product namespace
      - name: Deploy product flows
        uses: kestra-io/deploy-action@master
        with:
          namespace: product
          directory: ./kestra/flows/product
          resource: flow
          server: ${{ secrets.KESTRA_HOSTNAME }}

      # Deploy to engineering namespace
      - name: Deploy engineering flows
        uses: kestra-io/deploy-action@master
        with:
          namespace: engineering
          directory: ./kestra/flows/engineering
          resource: flow
          server: ${{ secrets.KESTRA_HOSTNAME }}

Additional Resources

Was this page helpful?