Skip to content

Commit

Permalink
Adds action to send GHA stats to Datadog. (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
timcosgrove authored Sep 4, 2024
1 parent 88a65aa commit 00bf50f
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/gha-metrics-datadog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Send GHA metrics to Datadog'
on:
workflow_run:
workflows:
- 'Content Release'
types:
- completed
jobs:
send:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-gov-west-1

# @todo: get Next Build specific API key
- name: Get Datadog api key from Parameter Store
uses: department-of-veterans-affairs/action-inject-ssm-secrets@d8e6de3bde4dd728c9d732baef58b3c854b8c4bb # latest
with:
ssm_parameter: /dsva-vagov/content-build/GHA_CONTENT_BUILD_DATADOG_API_KEY
env_variable_name: GHA_CONTENT_BUILD_DATADOG_API_KEY

- name: Send GitHub Actions metrics to DataDog
uses: int128/datadog-actions-metrics@432f143460957c07e730f9f082af7d5063e99f84 # v1.88.0
with:
datadog-api-key: ${{ env.GHA_CONTENT_BUILD_DATADOG_API_KEY }}
collect-job-metrics: true
collect-step-metrics: true
datadog-site: ddog-gov.com

0 comments on commit 00bf50f

Please sign in to comment.