mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
28 lines
811 B
YAML
28 lines
811 B
YAML
name: Upload tests to datadog
|
|
if: always()
|
|
inputs:
|
|
api-key:
|
|
description: "Datadog API key"
|
|
required: true
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- shell: bash
|
|
run: |
|
|
owner=${{ github.repository_owner }}
|
|
echo "owner: $owner"
|
|
if [[ $owner != "coder" ]]; then
|
|
echo "Not a pull request from the main repo, skipping..."
|
|
exit 0
|
|
fi
|
|
if [[ -z "${{ inputs.api-key }}" ]]; then
|
|
# This can happen for dependabot.
|
|
echo "No API key provided, skipping..."
|
|
exit 0
|
|
fi
|
|
npm install -g @datadog/datadog-ci@2.21.0
|
|
datadog-ci junit upload --service coder ./gotests.xml \
|
|
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
|
|
env:
|
|
DATADOG_API_KEY: ${{ inputs.api-key }}
|