Run a GitHub Action in CIE

Updated 1 month ago by Manish Jaiswal

Github Actions is a GitHub platform to automate various event-driven workflows in GitHub such as cloning a repository, building Docker images, testing scripts, etc. CIE now supports running GitHub Actions in Harness. You can seamlessly use all your GitHub Actions in CIE itself using the CIE Plugin step. In the CIE Plugin step, you need to use the Drone Plugin, plugins/github-actions. Github Actions Drone Plugin uses nektos/act in the background to run your GitHub Actions.

In this topic, we cover one of the several GitHub Actions listed in GitHub Marketplace, how to upload to GCP in CIE using GitHub Action.

In this topic:

Before You Begin

Step 1: Create the CI Stage

In your Harness Pipeline, click Add Stage, and then click CI.

Step 2: Add the Codebase

In Connector, select an existing Connector to your codebase repo, or create a new one. See Code Repo Connectors.

You can see the URL for the repo account below Repository Name. Don't add the URL into Repository Name.

In Repository Name, enter the name of the repo containing the codebase.

For example, if the account URL is and the repo in that account is myapp, you would just enter myapp in the Repository Name.

Step 3: Define the Build Farm Infrastructure

In the CI stage Infrastructure, define the build farm for the codebase.

The following example uses a Kubernetes cluster build farm.

In Select a Kubernetes Cluster, select, or create, a Kubernetes Connector. See Kubernetes Cluster Connector Settings Reference.

This Connector connects Harness to the cluster to use as the build farm.

In Namespace, enter the Kubernetes namespace to use.

You can use a Runtime Input (<+input>) or expression also. See Runtime Inputs.

See Define Kubernetes Cluster Build Infrastructure.

Step 4: Add the Plugin step

In the stage's Execution, click Add step, select Plugin.

The Plugin settings appear.

Enter the following settings:


Enter a unique name for the step.


Harness automatically generates a unique ID for the step.

Container Registry

Select or create a Harness Connector for the container registry.


Enter the name of the Drone Plugin. This Plugin allows running GitHub Action in CIE.



The Drone Plugin uses nektos/act to run GitHub Actions in CIE. It requires DIND (docker-in-docker) to run your images. Hence, the Privileged attribute needs to be enabled to run with escalated permissions.


Replicate the following attributes from the GitHub Action, under Settings in the Plugin step in CIE.  

name: It refers to the GitHub repo of action along with branch or tag.

with: It is a map with key and value as strings. These are inputs to the GitHub Actions.

env: Environment variables passed to the GitHub Actions.

For example, for the Upload Cloud Storage Action, the attributes are as follows: 



- uses:



path: pom.xml

destination: cie-demo-pipeline/github-action

 credentials: <+stage.variables.GCP_SECRET_KEY_BASE64>

The above attributes of Upload Cloud Storage Action are replicated in CIE Plugin Settings as follows:

For the step settings on CIE Plugin, see Plugin Step Settings.

Step 5: View the Results

Save the Pipeline and click Run

You can see the logs for the GitHub GCP Upload Action in the Pipeline as it runs.

Configure As Code: YAML

To configure your pipeline as YAML in CIE, go to Harness Pipeline Studio, click YAML. Here’s is a working example of GitHub Action Cloud Storage Upload to GCP in CIE. Modify the YAML attributes such as name, identifiers, codebase, connector ref, environment variables as per your requirement of the Pipeline.

name: gcp-upload-github-action # Configure your Pipeline name
identifier: gcpuploadgithubaction # Configure your Pipeline identifier
projectIdentifier: Demo_CI_pipelines # Configure your Project identifier
orgIdentifier: default # Configure your Organization
tags: {}
- stage:
identifier: gcp_upload_success_gha # Configure your Stage identifier
name: stage 1
type: CI
- name: GCP_SECRET_KEY_BASE64 # Configure your Secret Key Name
type: Secret
value: gcpbase64secret # Configure your Secret Key Value
- step:
identifier: gcsuploader # Configure your step identifier name
name: step one # Configure your step name
type: Plugin
connectorRef: dockerhub
image: plugins/github-actions
privileged: true
settings: # YConfigure your plugins Settings configuration
uses: google-github-actions/upload-cloud-storage@main
path: pom.xml
destination: cie-demo-pipeline/github-action
credentials: <+stage.variables.GCP_SECRET_KEY_BASE64>
infrastructure: # Configure your Infrastructure Settings
type: KubernetesDirect
connectorRef: buildfarm
namespace: cie-demo-pipeline
codebase: # Configure your Codebase
connectorRef: githubautouser
repoName: springboot
type: branch
branch: ci-autouser

See Also

Please Provide Feedback