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
- In Costimizer, open Shared Environments and click the environment you want to update.
- 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
- In your GitHub repository, go to Settings → Secrets and variables → Actions.
- Click New repository secret.
- Name it
ENV_COLLECTOR_URLand 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
- Trigger a GitHub Actions workflow run.
- Open the Shared Environment details page in Costimizer and scroll to Shared Environment properties.
- Confirm that
Pipeline resultandVersionupdate automatically after the workflow finishes.