Git push to deploy to Camunda Cloud

by Josh Wulf on Feb 13 2020 in GitHubUse casesResources.

Using the Zeebe Action for GitHub, you can automate your GitHub repo to deploy BPMN models to Camunda Cloud when you push to a specific branch.

In this quick tutorial, I show you how to configure your GitHub repo to deploy all BPMN models in the bpmn directory of your repo on a push to master.

If you don’t have a Camunda Cloud account yet, you can join the public beta to get one.

Create a client in Camunda Cloud

Configure Secret in your GitHub repo

Create a GitHub workflow to deploy models

name: Deploy Workflows

on:
  push:
    branches:
      - master
    paths:
      - 'bpmn/*'

jobs:
  deploy-workflows:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Deploy Updated Workflows
        uses: jwulf/zeebe-action@master
        with:
          client_config: ${{ secrets.ZEEBE_CLIENT_CONFIG }}
          operation: deployWorkflow
          bpmn_directory: bpmn

That’s it!

That’s all you need to do. You now have automation in your GitHub repo to redeploy your BPMN models when they are updated on the master branch of your repo.

The paths filter ensures that the deployment happens when the push to master includes a change to at least one model.

Zeebe will only create new versions for the models that were changed since the last deployment, so although the Zeebe Action will send all models in the bpmn directory to Camunda Cloud, only the updated models will get new versions deployed.

What else is possible?

The Zeebe Action can start workflow instances in Camunda Cloud, and publish messages to Camunda Cloud - either to start a new workflow instance, or to be correlated with a running instance. For more ideas on what you can do with it, see the Zeebe Action README.