-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathaction.yml
More file actions
25 lines (23 loc) · 910 Bytes
/
action.yml
File metadata and controls
25 lines (23 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: datadog
inputs:
datadog_api_key:
description: "Datadog API key"
TOTAL_PACKAGES:
description: "Total # of packages"
runs:
using: composite
steps:
- name: Send metrics to Datadog
run : |
# TODO: move it back to setup_ubuntu action
# For the datadog cli, it must be installed via python
# to install python packages on CI environment, we must activate the virtual env
# or otherwise it throws error: externally-managed-environment
python3 -m venv venv
source venv/bin/activate
pip install datadog
# TODO: move it back to setup_ubuntu action
# Add a dogrc so we can submit metrics to datadog
printf "[Connection]\napikey = ${{inputs.datadog_api_key}}\nappkey =\n" > ~/.dogrc
dog metric post mobify_platform_sdks.generated_project_total_packages ${{ inputs.TOTAL_PACKAGES }}
shell: bash