-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds action to send GHA stats to Datadog. (#715)
- Loading branch information
1 parent
88a65aa
commit 00bf50f
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |