Integrations
GitHub Actions
Automatically log changes to ChangeVault from your GitHub Actions workflows.
Overview
Use the ChangeVault API inside a GitHub Actions workflow to automatically log deployments, infrastructure changes or any other event.
Setup
1. Store your API key as a secret
In your GitHub repository, go to Settings → Secrets and variables → Actions and add a new secret:
- Name:
CHANGEVAULT_API_KEY - Value: your API key from the ChangeVault dashboard
2. Add the workflow step
- name: Log deployment to ChangeVault
run: |
curl -X POST https://app.changevault.dev/api/changes \
-H "x-api-key: ${{ secrets.CHANGEVAULT_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"title": "Deployed ${{ github.repository }} @ ${{ github.sha }}",
"risk_level": "low",
"status": "completed",
"tags": ["deploy", "github-actions"]
}'Full workflow example
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy application
run: echo "Your deploy step here"
- name: Log to ChangeVault
if: success()
run: |
curl -X POST https://app.changevault.dev/api/changes \
-H "x-api-key: ${{ secrets.CHANGEVAULT_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"title": "Deployed ${{ github.repository }} to production",
"description": "Commit: ${{ github.sha }}\nAuthor: ${{ github.actor }}",
"risk_level": "low",
"status": "completed",
"tags": ["deploy", "production"]
}'
- name: Log failed deploy to ChangeVault
if: failure()
run: |
curl -X POST https://app.changevault.dev/api/changes \
-H "x-api-key: ${{ secrets.CHANGEVAULT_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"title": "Failed deploy: ${{ github.repository }}",
"risk_level": "high",
"status": "rolled_back",
"tags": ["deploy", "failed"]
}'API access requires the Pro plan or higher.