{"id":21393393,"url":"https://github.com/camunda-community-hub/camunda-platform-8-github-action","last_synced_at":"2025-07-13T18:32:04.897Z","repository":{"id":38427174,"uuid":"239448579","full_name":"camunda-community-hub/camunda-platform-8-github-action","owner":"camunda-community-hub","description":"A GitHub action for Zeebe and Camunda Platform 8 to create workflow instances and publish messages","archived":false,"fork":false,"pushed_at":"2024-02-16T18:24:41.000Z","size":39517,"stargazers_count":16,"open_issues_count":8,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T13:54:31.993Z","etag":null,"topics":["camunda-8","camunda-platform-8","github-actions","workflow-instance","zeebe"],"latest_commit_sha":null,"homepage":"https://camunda.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/camunda-community-hub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-10T07:04:19.000Z","updated_at":"2025-04-09T10:15:25.000Z","dependencies_parsed_at":"2023-11-14T03:31:46.150Z","dependency_job_id":"a14d3b07-dde0-44c2-96d1-7ee77290e4b3","html_url":"https://github.com/camunda-community-hub/camunda-platform-8-github-action","commit_stats":{"total_commits":128,"total_committers":6,"mean_commits":"21.333333333333332","dds":0.3125,"last_synced_commit":"8e00ce2ca0fea92cbead384bf0d5881dac5d499e"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/camunda-community-hub/camunda-platform-8-github-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camunda-community-hub%2Fcamunda-platform-8-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camunda-community-hub%2Fcamunda-platform-8-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camunda-community-hub%2Fcamunda-platform-8-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camunda-community-hub%2Fcamunda-platform-8-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/camunda-community-hub","download_url":"https://codeload.github.com/camunda-community-hub/camunda-platform-8-github-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camunda-community-hub%2Fcamunda-platform-8-github-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264734185,"owners_count":23655613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["camunda-8","camunda-platform-8","github-actions","workflow-instance","zeebe"],"created_at":"2024-11-22T14:11:34.212Z","updated_at":"2025-07-13T18:32:04.407Z","avatar_url":"https://github.com/camunda-community-hub.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Integrate GitHub Actions with Camunda 8 SaaS\n\n![Community Extension](https://img.shields.io/badge/Community%20Extension-An%20open%20source%20community%20maintained%20project-FF4700)\n\n![Lifecycle](https://img.shields.io/badge/Lifecycle-Stable-brightgreen)\n\n![Compatible with: Camunda Platform 8](https://img.shields.io/badge/Compatible%20with-Camunda%20Platform%208-0072Ce)\n\nThis GitHub Action allows you to integrate GitHub Actions into workflows orchestrated by [Zeebe](https://zeebe.io) on [Camunda Platform 8 SaaS](https://camunda.io).\n\nYou can deploy a process definition to Camunda 8 SaaS, create a process instance from a GitHub Action, start and run an entire process on Camunda 8 SaaS and act on the outcome in a GitHub Action, or publish a message from a GitHub Action to a process instance running in Camunda 8 SaaS.\n\nSee this article: \"[Complex multi-repo builds with GitHub Actions and Camunda Cloud](https://zeebe.io/blog/2020/02/camunda-cloud-github-actions/)\" for some ideas on orchestrating multi-repo build workflows using Camunda SaaS.\n\n## Node version compatibility\n\nThis GitHub Action uses a version of the Zeebe Node client that requires Node versions 12.22.5+, 14.17.5+, or 16.6.1+.\n\n## Operations\n\n| Operation | Required Parameters | Optional Parameters |\n| --- | --- | --- |\n| `deployProcess` | **One of**: `bpmnFilename` _or_ `bpmnDir` | `verbose`, `quiet` |\n| `deployResource` | **One of**: `resourceFilename` _or_ `resourceDir` | `verbose`, `quiet` |\n| `createProcessInstance` | `bpmnProcessId` |  `variables`, `verbose`, `quiet` |\n|`createProcessInstanceWithResult` | `bpmnProcessId`, `requestTimeoutSeconds` | `variables`, `verbose`, `quiet` |\n| `publishMessage` | `messageName` | `timetoLive`, `variables`, `correlationKey`, `verbose`, `quiet` |\n| `startWorkers` | `workerHandlerFile`, `workerLifetimeMins` | `githubToken`, `verbose`, `quiet` |\n\n## Configure Camunda SaaS credentials\n\nIn a repository where you have a GitHub workflow that uses this action, you need to configure your Camunda SaaS client credentials.\n\n* In the [Camunda SaaS console](https://console.cloud.camunda.io/), click the button to copy your client connection info.\n\n![](img/client-creds.png)\n\n* Set a secret in your repo (Repo Settings \u003e Secrets) `ZEEBE_CLIENT_CONFIG`, and paste in the entire block from Camunda SaaS.\n\n![](img/secret.png)\n\nSee the note at the end of this document if you get errors about missing required configuration keys.\n\n## Deploy a Process Definition\n\nHere is an example of deploying a process definition from GitHub. This will deploy the process in the file `bpmn/demo-get-time.bpmn` in the repo:\n\n```\nname: Run Get Time Demo\n\non: [repository_dispatch]\n\njobs:\n  demo-get-time:\n    if: github.event.action == 'get_time'\n    runs-on: ubuntu-latest\n\nsteps:\n  - uses: actions/checkout@v2\n  - name: Deploy Demo Process \"Get Time\"\n    uses: camunda-community-hub/camunda-platform-8-github-action@master\n    with:\n      clientConfig: ${{ secrets.ZEEBE_CLIENT_CONFIG }}\n      operation: deployProcess\n      bpmnFilename: bpmn/demo-get-time.bpmn\n```\n\n## Automate Deployment of BPMN Models on Push to master\n\nHere is a workflow that redeploys changed models in the `bpmn` directory of your repo on a push to the master branch:\n\n```\nname: Deploy Processes\n\non:\n  push:\n    branches:\n      - master\n    paths:\n      - 'bpmn/*'\n\njobs:\n  deploy-processes:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n      - name: Deploy Updated Processes\n        uses: camunda-community-hub/camunda-platform-8-github-action@master\n        with:\n          clientConfig: ${{ secrets.ZEEBE_CLIENT_CONFIG }}\n          operation: deployProcess\n          bpmnDirectory: bpmn\n```\n\n## Deploy a Decision Table or Form\n\nHere is an example of deploying a decision table from GitHub. This will deploy the decision in the file `resource/demo.dmn` in the repo:\n\n```\nname: Run Get Time Demo\n\non: [repository_dispatch]\n\njobs:\n  demo-get-time:\n    if: github.event.action == 'get_time'\n    runs-on: ubuntu-latest\n\nsteps:\n  - uses: actions/checkout@v2\n  - name: Deploy Demo Decision Table\n    uses: camunda-community-hub/camunda-platform-8-github-action@master\n    with:\n      clientConfig: ${{ secrets.ZEEBE_CLIENT_CONFIG }}\n      operation: deployResource\n      resourceFilename: resource/demo.dmn\n```\n\n## Automate Deployment of BPMN Models, Decision Tables, and Forms on Push to master\n\nHere is a workflow that redeploys all changed resources in the `resources` directory of your repo on a push to the master branch:\n\n```\nname: Deploy Resources\n\non:\n  push:\n    branches:\n      - master\n    paths:\n      - 'resources/*'\n\njobs:\n  deploy-resources:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n      - name: Deploy Updated Resources\n        uses: camunda-community-hub/camunda-platform-8-github-action@master\n        with:\n          clientConfig: ${{ secrets.ZEEBE_CLIENT_CONFIG }}\n          operation: deployResource\n          resourceDirectory: resources\n```\n\n## Start a Process Instance\n\nHere is an example of starting a process instance from within a GitHub Workflow:\n\n```\nname: Report Outcome\n\non: repository_dispatch\n\njobs:\n  report:\n    runs-on: ubuntu-latest\n    timeout-minutes: 10\n    steps:\n      - uses: actions/checkout@v2\n      - name: Use Node.js 16.x\n        uses: actions/setup-node@v1\n        with:\n          node-version: 16.x\n      - run: echo github.event.action: ${{ github.event.action }}\n      - name: Create Process\n        uses: camunda-community-hub/camunda-platform-8-github-action@master\n        with:\n          clientConfig: ${{ secrets.ZEEBE_CLIENT_CONFIG }}\n          operation: createProcessInstance\n          bpmnProcessId: throw-test\n          variables: '{\"event\": \"${{ github.event.action }}\" }'\n```\n\n## Awaiting the outcome of a Process Instance\n\nYou can create a process instance and retrieve the outcome of the process instance for use in further steps:\n\n```\nname: Run Get Time Demo\n\non: [repository_dispatch]\n\njobs:\n  demo-get-time:\n    if: github.event.action == 'get_time'\n    runs-on: ubuntu-latest\n\nsteps:\n  - uses: actions/checkout@v2\n  - name: Deploy Demo Process \"Get Time\"\n    uses: camunda-community-hub/camunda-platform-8-github-action@master\n    with:\n      clientConfig: ${{ secrets.ZEEBE_CLIENT_CONFIG }}\n      operation: deployProcess\n      bpmnFilename: bpmn/demo-get-time.bpmn\n  - name: Execute Demo Process \"Get Time\"\n    uses: camunda-community-hub/camunda-platform-8-github-action@master\n    id: get-time\n    with:\n      operation: createProcessInstanceWithResult\n      bpmnProcessId: demo-get-time\n      requestTimeout: 30 # seconds\n  - name: Print Process Outcome\n    run: echo The outcome is ${{ toJSON(steps.get-time.outputs.result }}\n  - name: Print time\n    run: echo The time is ${{ steps.get-time.outputs.result.body.time }}\n```\n\nWhen awaiting a process outcome, if no `request_timeout` is provided, it defaults to the Gateway timeout of the cluster (15 seconds). For processes that take longer than this to complete, you should specify a `request_timeout`.\n\nNote that once the connection configuration is provided, it is available to any further Zeebe Action operations in the GitHub workflow.\n\n## Publish a message\n\nHere is an example of publishing a message back to Camunda SaaS, to be correlated with a running process instance. In this example, the action has been started with a `repository_dispatch` event from the CAMUNDA-HTTP worker. The `client_payload` on the event contains the correlationKey value for the message:\n\n```\ntriggerDependentFlow:\n  runs-on: ubuntu-latest\n  steps:\n    - name: Tell Camunda SaaS What's up!\n      uses: camunda-community-hub/camunda-platform-8-github-action@master\n      with:\n        clientConfig: ${{ secrets.ZEEBE_CLIENT_CONFIG }}\n        operation: publishMessage\n        messageName: BASE_IMAGE_REBUILT\n        correlationKey: ${{ github.event.client_payload.buildid }}\n```\n\nVariables can be provided in a `publishMessage` operation. They should be stringified JSON, just like the `createProcessInstance` operation.\n\n## Create Workers \n\nYou can start Zeebe task workers in a GitHub Workflow, using handler code loaded from your repo.\n\nDependencies in a `package.json` file in the `.github/workflows` folder are installed when workers are started.\n\nFor example, to start workers based on a `workers.js` file in the root of your repo, and shut them down after 10 minutes:\n\n```\nname: Start Workers\n\non: repository_dispatch\n\njobs:\n  report:\n    runs-on: ubuntu-latest\n    timeout-minutes: 10\n    steps:\n      - uses: actions/checkout@v2\n      - name: Use Node.js 12.x\n        uses: actions/setup-node@v1\n        with:\n          node-version: 12.x\n      - name: Start Zeebe Workers\n        uses: camunda-community-hub/camunda-platform-8-github-action@master\n        with:\n          clientConfig: ${{ secrets.ZEEBE_CLIENT_CONFIG }}\n          # If you want to access the GitHub API in your worker:\n          githubToken: ${{ secrets.GITHUB_TOKEN }} \n          operation: startWorkers\n          workerHandlerFile: workers.js\n          workerLifetimeMins: 10\n```\n\nThe `workers.js` file should look like this: \n\n```javascript\nmodule.exports = {\n  let stockLevel = 100\n  tasks: {\n    'get-stock-level: (job, complete) =\u003e {\n      // you have @actions/core in scope\n      core.info(JSON.stringify(job, null, 2))\n      complete.success({\n        stockLevel\n      })\n    },\n    'decrement-stock': (job, complete) =\u003e {\n      stock --\n      complete.success({\n        stockLevel\n      })\n    }\n  }\n}\n```\n\nIf you want to make GitHub API calls in your worker, then set the `gitHubToken` parameter as `githubToken: ${{ secrets.GITHUB_TOKEN }}`.\n\nThen your worker code will have a hydrated [Octokit](https://github.com/actions/toolkit/tree/master/packages/github) reference in scope as `octokit`. \n\n## Development\n\nRun the `npm run rebuild` task before checking the code in.\n\nFor this, you need Docker running.\n\nThe action is rebuilt on GitHub by the build.yaml workflow, to ensure that it has the correct binaries for gRPC in the GitHub runner environment.\n\nTo create a new release, tag the master branch, then use the GitHub \"Create a Release\" feature.\n\n## A note on configuration\n\nPreviously, you had to create individual secrets for each of the client credential fields: `ZEEBE_ADDRESS`, `ZEEBE_CLIENT_ID`, etc...\n\nHowever, this is clunky. Ain't nobody got time fo' that!\n\nWe are waiting on the [single JSON-parseable connection string](https://github.com/zeebe-io/zeebe/issues/3544) to land. In the meantime, the Zeebe Action parses the text of the credentials block from the Cloud console to extract the credential values. Text parsing is brittle, and a change in the formatting of that block could break it.\n\nAs a backup, the previous method still works. To use it that way, create a secret for each one, and paste in the _unquoted_ value of the variable.\n\nThen in your workflows, you need to do:\n\n```\njobs:\n  startWorkflow:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Get current time\n        uses: gerred/actions/current-time@master\n        id: current-time\n      - name: Create Zeebe Process Instance\n        uses: camunda-community-hub/camunda-platform-8-github-action@master\n        with:\n          zeebeAddress: ${{ secrets.ZEEBE_ADDRESS }}\n          zeebeClientId: ${{ secrets.ZEEBE_CLIENT_ID }}\n          zeebeAuthorizationServerUrl: ${{ secrets.ZEEBE_AUTHORIZATION_SERVER_URL }}\n          zeebeClientSecret: ${{ secrets.ZEEBE_CLIENT_SECRET }}\n          operation: createProcessInstance\n          bpmnProcessId: magikcraft-github-build\n          variables: '{\"buildid\": \"${{ github.sha }}-${{ steps.current-time.outputs.time }}\"}'\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamunda-community-hub%2Fcamunda-platform-8-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamunda-community-hub%2Fcamunda-platform-8-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamunda-community-hub%2Fcamunda-platform-8-github-action/lists"}