Skip to main content
Extend your GitHub Actions workflow with an integration test that automatically picks up your application’s dynamic Ingress host URL. This guide shows you how to:
  • Deploy manifests to a Kubernetes cluster
  • Capture the Ingress hostname as a workflow output
  • Consume that output in a downstream integration-testing job

Adding the Integration Test Job

After your dev-deploy job completes, add an integration-testing job that references the URL output:
The curl and jq utilities are pre-installed on the ubuntu-latest runner.
Using curl -k skips TLS verification. Only use this in non-production or trusted test environments.

Retrieving the Ingress Host URL

To surface the Ingress host from Kubernetes into your workflow:
  1. Invoke kubectl in the deploy job to read the host via JSONPath.
  2. Write that hostname to GITHUB_OUTPUT.
  3. Expose it as a job-level output.

1. Modify the Deploy Job

In your dev-deploy job, after applying the manifests, add a step with an ID to capture the host:

Kubernetes Ingress Example

2. Extract the Ingress Host via CLI

Run these commands locally or in a step to confirm your JSONPath:

3. Expose the Step Output as a Job Output

Enable downstream jobs to consume the captured host by defining an outputs section:

Consuming the Output in Integration Testing

In the integration-testing job, map the job output to an environment variable:

Passing Values Between Jobs

The image shows a GitHub Docs page about passing values between steps and jobs in a workflow, with navigation links and support options.
Learn more in the GitHub Actions docs on passing values between jobs.

Official Example

Workflow Run Summary

The image shows a GitHub Actions workflow summary for a project named "solar-system," indicating a successful run with various jobs like unit testing, code coverage, and containerization. The workflow was triggered by a push and completed in 2 minutes and 4 seconds.

Integration Testing Job Log

The image shows a GitHub Actions workflow interface with a successful "Dev Integration Testing" job, displaying job setup and test output details.
This confirms that the dynamic Ingress host URL was successfully passed from the deploy job to the integration-testing job.

References

Watch Video