Skip to main content

GitHub integration

Summary​

The GitHub integration lets your GitHub Actions workflows send deployment metadata (such as pipeline result, deployed commit SHA, branch, or software version) directly to a Costimizer Shared Environment after every run.

This keeps engineering and QA teams informed about what is currently deployed in each shared environment alongside its cloud cost.

Estimated time: 5 minutes
Category: Developer Tools

Prerequisites​

  • At least one Shared Environment created in Costimizer
  • A GitHub repository using GitHub Actions (.github/workflows/*.yml)

Steps​

1. Copy your Shared Environment collector URL​

  1. In Costimizer, open Shared Environments and click the environment you want to update.
  2. On the Shared Environment details page, copy the ENV_COLLECTOR_URL from the CI/CD Integration panel.

2. Store ENV_COLLECTOR_URL in GitHub Secrets​

  1. In your GitHub repository, go to Settings → Secrets and variables → Actions.
  2. Click New repository secret.
  3. Name it ENV_COLLECTOR_URL and paste the collector URL from Costimizer.

3. Add a status step to your GitHub Actions workflow​

Add the following step at the end of your deployment job in .github/workflows/deploy.yml:

- name: Send status
if: always()
run: |
curl -X POST \
-H "Content-Type: application/json" \
-d "{\"Pipeline result\": \"${{ job.status }}\", \"Version\": \"${{ github.sha }}\"}" \
"${{ secrets.ENV_COLLECTOR_URL }}"
Send custom properties

You can include any string key-value pairs in the JSON payload (for example, Branch, TriggeredBy, or Environment). Passing null as a value removes that property from the Shared Environment.

Verification​

  1. Trigger a GitHub Actions workflow run.
  2. Open the Shared Environment details page in Costimizer and scroll to Shared Environment properties.
  3. Confirm that Pipeline result and Version update automatically after the workflow finishes.