Logging deployments in Alert24 gives you a change log you can correlate against incidents. When something breaks after a deploy, the timeline is already in Alert24. Add a step at the end of your deployment workflow and every release is tracked automatically.
Before you start
You'll need:
- An Alert24 API key with
writescope (Settings → API Keys), stored as a GitHub Actions secret - A GitHub Actions workflow that deploys your application
Add a step to your workflow
# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy application
run: ./scripts/deploy.sh # your existing deploy step
- name: Log deployment to Alert24
if: success()
env:
ALERT24_API_KEY: ${{ secrets.ALERT24_API_KEY }}
run: |
curl -s -X POST https://app.alert24.net/api/v1/changes \
-H "Authorization: Bearer $ALERT24_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"summary": "Deployed ${{ github.repository }} @ ${{ github.sha }}",
"change_type": "deployment",
"environment": "production",
"branch": "${{ github.ref_name }}",
"commit_sha": "${{ github.sha }}",
"commit_message": ${{ toJson(github.event.head_commit.message) }},
"pr_number": ${{ github.event.pull_request.number || 'null' }},
"pipeline_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"changed_by": "${{ github.actor }}",
"source": "github-actions",
"tags": ["github-actions", "${{ github.ref_name }}"]
}'
Link to a specific service
If this deployment affects a specific Alert24 service, add service_id:
-d '{
"summary": "Deployed payment-service @ ${{ github.sha }}",
"service_id": "svc_YOUR_SERVICE_ID",
"change_type": "deployment",
"environment": "production",
...
}'
Find your service ID in Alert24 under Services or via GET /api/v1/services.
Multiple environments
Use a matrix or environment-specific job to track staging and production separately:
- name: Log deployment to Alert24
env:
ALERT24_API_KEY: ${{ secrets.ALERT24_API_KEY }}
run: |
ENV="${{ github.ref_name == 'main' && 'production' || 'staging' }}"
curl -s -X POST https://app.alert24.net/api/v1/changes \
-H "Authorization: Bearer $ALERT24_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"summary\": \"Deployed to $ENV\", \"environment\": \"$ENV\", ...}"
Tips
if: success(): Only log the change if the deployment step succeeded. Useif: always()if you also want to track failed deploys (setchange_type: "rollback"for failures).- Rollbacks: For a rollback workflow, set
"change_type": "rollback"and"risk_level": "high"to make it stand out in the timeline. - GitHub Environments: If you use GitHub Environments for deployment approval, the
environmentname maps directly to Alert24'senvironmentfield — use${{ github.event.deployment.environment }}.