Skip to content

Commit

Permalink
Create Raygun deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwaldron authored Jan 17, 2024
1 parent becd06a commit 7f7bcf3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/raygun-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Workflow to register a new application deployment with Raygun.

name: Raygun Deployment Tracking

on:
push:
tags: [prod/*]

jobs:
raygun-deployment:
runs-on: ubuntu-latest
steps:
- name: Get the version number
id: get_version
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT

- name: Send to the Raygun Deployments API
id: send_deployment
uses: fjogeleit/http-request-action@v1
with:
url: https://api.raygun.com/v3/applications/api-key/${{ secrets.RAYGUN_APIKEY }}/deployments
method: POST
bearerToken: ${{ secrets.RAYGUN_AUTHTOKEN }}
data: >-
{
"version": "${{ steps.get_version.outputs.VERSION }}",
"ownerName": "${{ github.event.pusher.name }}",
"emailAddress": "${{ github.event.pusher.email }}",
"scmIdentifier": "${{ github.sha }}",
"scmType": "GitHub"
}
- name: Show response
run: echo ${{ steps.send_deployment.outputs.response }}

0 comments on commit 7f7bcf3

Please sign in to comment.