Integrate GitHub Actions with Harness for streamlined CI/CD. Learn to build, test, and deploy applications efficiently with step-by-step guidance.

TL;DR
- GitHub Actions workflows automate continuous integration tasks including building, testing, and pushing Docker images on every commit or pull request to your repository.
- You can trigger GitHub Actions workflows three ways: repository events (push, pull request, issue creation), scheduled intervals using cron syntax, or external webhook events.
- Harness CD monitors your Docker registry for new artifacts built by GitHub Actions, then automatically triggers deployment workflows to target Kubernetes environments with built-in rollback and approval policies.
- A complete CI/CD pipeline from code commit to live Kubernetes deployment can be configured in under 10 minutes and executes in approximately 3 minutes per deployment cycle.
GitHub Actions is an automated way of performing development workflows. These workflows, defined through YAML files, are stored in your GitHub repository under the .github/workflows directory. You can trigger these workflows three ways via an external event, a scheduled event, or a GitHub repository event (such as a push or pull request to a GitHub repo or issue creation). If you want to learn more about GitHub Actions, including the usage limits of the feature, see this documentation here.
One way to use GitHub Actions is to create continuous integration (CI) workflows that build and test projects written in your application’s programming language. GitHub Actions is also able to publish artifacts to GitHub Packages or another package hosting provider such as Docker Hub. There is Dockerfile support for GitHub Actions, along with the ability to leverage actions built by other developers.
This blog post uses these GitHub Actions features with the Harness platform to continuously deliver a Kubernetes deployment.
Ready Set Action!
If you’d like to follow along with this step by step guide you can find the now public repository with the application code here: GitHub. Otherwise you may use your own application code and Dockerfile.
To get started with GitHub Actions create a workflow, by selecting the Actions tab of the GitHub repository.
If you select the option to “set up a workflow yourself,” GitHub creates a main.yml file with the .github/workflows directory for you with a templated workflow that you can edit.
Here I am creating a “build” and “create_dockerfile” job within my CI workflow. These jobs are the sequential steps within the workflow. A pushed commit triggers this workflow to the repo. Any steps that fail cause the workflow to quit at that failure.
My create_dockerfile job requires credentials to my Docker account. To define those secrets go to Settings, Secrets, and Add a new secret.
Also, note your Docker credential must have the authority to push and pull Docker images from your Docker Hub.
Once now trigger your GitHub Actions CI workflow, and view the details of each step within the workflow.
Here my image repository on Docker Hub has the newly pushed docker image named tictactoe as specified within my workflow.
Harness Your Delivery
Now it’s time to deploy the new artifact to a Kubernetes environment with Harness.
Under Setup, ensure you have a Harness Delegate installed in your environment, and it is currently running. Under Connectors, Artifact Servers ensure you have added an artifact server with valid Docker Credentials.
Under Setup Create a new application called tictactoe. Use this application view to create a service, environment and workflow to deploy the tictactoe application.
Here my application is deploying a single service called tictactoe. To pull the Docker image from my public Docker Hub repository I need the proper Source Server defined earlier and the corresponding repository information.
After specifying a targeted Kubernetes environment for deployment, create a Kubernetes deployment workflow. Here I am using a minikube environment to deploy the latest artifact.
When you are ready to deploy the artifact, hit the Deploy button and view the application deployment status.
Creating a deployment workflow is really easy and can be done in less than 3 minutes. This video is a step-by-step guide to deploying the tictactoe artifact with Harness.
Creating a workflow trigger within Harness is also very simple. Here I trigger the “deploy to minikube” workflow on the condition there is a new tictactoe artifact (docker image) ready to be deployed.
Master your development workflows
Github Actions allows developers to trigger software development workflows for a variety of application frameworks, runtimes, and languages. This blog posts how to set up a Continuous Integration workflow in GitHub Actions to build a deployable artifact. We then used Harness for Continuous Delivery of that artifact to a Kubernetes environment in less than 3 minutes. Try Harness CD for free to start delivering with unique developer workflows.
Learn more: Overcome long-term dependencies with dynamic process monitoring
Frequently Asked Questions
What is GitHub Actions used for?
GitHub Actions is a CI/CD automation platform integrated directly into GitHub repositories. It automates software development workflows including building code, running automated tests, packaging applications, publishing artifacts to registries, and deploying to production environments. Workflows are defined in YAML files and triggered by repository events (commits, pull requests), scheduled intervals, or external webhooks. GitHub Actions supports all major programming languages and integrates with cloud providers, container registries, and third-party tools.
How do you trigger a GitHub Actions workflow?
GitHub Actions workflows can be triggered three ways. First, repository events such as push, pull request, issue creation, or release publication. Second, scheduled triggers using cron syntax for time-based automation (e.g., nightly builds). Third, manual triggers via the Actions tab in GitHub or external webhook events from other services. The most common trigger is "on: push" which executes the workflow every time code is committed to specified branches.
Can GitHub Actions build Docker images?
Yes. GitHub Actions has native Docker support. GitHub-hosted runners come with Docker pre-installed, so you can use standard Docker commands in your workflow steps. Common Docker workflows include using "docker build" to create images from Dockerfiles, "docker tag" to version images, and "docker push" to publish to Docker Hub, GitHub Container Registry, or other registries. You can also use pre-built Actions from the GitHub Marketplace for Docker operations.
How does Harness integrate with GitHub Actions?
Harness CD integrates with GitHub Actions through artifact monitoring and automated deployment triggers. After GitHub Actions builds and pushes a Docker image to your registry (Docker Hub, ECR, GCR), Harness monitors that registry for new artifacts. When a new image version is detected, Harness automatically triggers a deployment workflow to your configured Kubernetes environment. You can set up approval gates, deployment strategies (canary, blue-green, rolling), verification steps, and rollback policies within Harness.
How long does it take to deploy with GitHub Actions and Harness?
A complete pipeline from code commit to live Kubernetes deployment typically takes 2 to 4 minutes. GitHub Actions handles the CI phase (build, test, push to registry) in approximately 1 to 2 minutes depending on code complexity and test coverage. Harness CD then executes the deployment phase in 30 to 90 seconds depending on image size, cluster resources, and deployment strategy. Total setup time for both platforms is under 10 minutes for a basic pipeline.


