Skip to main content

Generated GitHub Actions workflow

When you run dorgu generate, a GitHub Actions workflow is created at .github/workflows/deploy.yaml. This workflow handles building your container image, pushing it to a registry, and deploying to Kubernetes. Here is the generated workflow with annotations:
The registry, image name, and deployment name are populated from your .dorgu.yaml and global config. The example above shows the defaults for a ghcr.io registry.

Customizing the workflow

The generated workflow is a starting point. Common customizations include:
  • Adding a test stage — insert a step before the build that runs your test suite (npm test, go test ./..., pytest, etc.)
  • Changing the registry — update the registry field in the login action and image tags to use Docker Hub, AWS ECR, Google Artifact Registry, or any OCI-compatible registry
  • Adding environment-specific deploys — duplicate the deploy step with different if conditions for staging and production branches
  • Adding secrets — use GitHub repository secrets for any credentials beyond the default GITHUB_TOKEN

ArgoCD Application

If ArgoCD is detected on your cluster (via dorgu cluster init) or configured in your global config, Dorgu generates an ArgoCD Application manifest at k8s/argocd/application.yaml:

ArgoCD sync policy

The generated ArgoCD Application uses an automated sync policy with two key behaviors:
  • Prune (prune: true) — when you remove a manifest from git, ArgoCD automatically deletes the corresponding resource from the cluster. This keeps the cluster in sync with your repository.
  • Self-heal (selfHeal: true) — if someone manually changes a resource on the cluster (e.g., via kubectl edit), ArgoCD reverts it to match the git state. This prevents configuration drift.
Together, these settings enforce a strict GitOps workflow where git is the single source of truth.

Skipping generation

If you already have CI/CD pipelines or don’t want Dorgu to generate them, use the skip flags:
These flags work with both dorgu generate and dorgu persona generate.