Back to Dapr

Setup Continuous Integration

docs/development/setup-ci.md

1.17.62.1 KB
Original Source

Setup Continuous Integration

Dapr uses GitHub Actions for continuous integration in order to automate the build and publish processes. As long as you have GitHub Account, you can set up your own private Actions in your fork of the Dapr repo. This document helps you set up the continuous integration for Dapr.

Prerequistes

  • GitHub Account

How to set up GitHub Actions in your account

  1. Fork the dapr/dapr repo to your GitHub Account

  2. Go to Settings in the forked repo and click Secrets

  1. Add secret variables for Dapr CI

  • DOCKER_REGISTRY : Your private Docker registry name or dockerhub id e.g. docker.io/[your_dockerhub_id]
  • DOCKER_REGISTRY_ID : Your private Docker registry id
  • DOCKER_REGISTRY_PASS : Your private Docker registry password or Docker Hub password/token
  • DAPR_BOT_TOKEN : Your GitHub Personal Access Token; you do not need this unless you want to publish binaries to your forked GitHub release.
  1. Go to Actions tab

Click I understand my workflows, go ahead and run them

  1. Make sure your Actions is enabled

Trigger the build

Dapr CI has give different behaviors based on the situations:

Build binariesStore binaries into artifactPublish docker imageGitHub Release
Create PR against master branchXX
Push the commit to master branchXXdapr:edge image
Push vX.Y.Z-rc.R tag e.g. v0.0.1-rc.0XXdapr:vX.Y.Z-rc.R imageX
Push vX.Y.Z tag e.g. v0.0.1XXdapr:vX.Y.Z and dapr:vX.Y.Z:latest imageX
Cron schedule ("nightly")XXdapr:nightly-YYYY-MM-DD image