File tree 1 file changed +28
-2
lines changed
.github/actions/upload-datadog
1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change 10
10
steps :
11
11
- shell : bash
12
12
run : |
13
+ set -e
14
+
13
15
owner=${{ github.repository_owner }}
14
16
echo "owner: $owner"
15
17
if [[ $owner != "coder" ]]; then
21
23
echo "No API key provided, skipping..."
22
24
exit 0
23
25
fi
24
- npm install -g @datadog/datadog-ci@2.21.0
25
- datadog-ci junit upload --service coder ./gotests.xml \
26
+
27
+ TMP_DIR=$(mktemp -d)
28
+
29
+ if [[ "${{ runner.os }}" == "Windows" ]]; then
30
+ BINARY_PATH="${TMP_DIR}/datadog-ci.exe"
31
+ BINARY_URL="https://github.com/DataDog/datadog-ci/releases/download/v2.48.0/datadog-ci_win-x64"
32
+ elif [[ "${{ runner.os }}" == "macOS" ]]; then
33
+ BINARY_PATH="${TMP_DIR}/datadog-ci"
34
+ BINARY_URL="https://github.com/DataDog/datadog-ci/releases/download/v2.48.0/datadog-ci_darwin-arm64"
35
+ elif [[ "${{ runner.os }}" == "Linux" ]]; then
36
+ BINARY_PATH="${TMP_DIR}/datadog-ci"
37
+ BINARY_URL="https://github.com/DataDog/datadog-ci/releases/download/v2.48.0/datadog-ci_linux-x64"
38
+ else
39
+ echo "Unsupported OS: ${{ runner.os }}"
40
+ exit 1
41
+ fi
42
+
43
+ echo "Downloading DataDog CI binary for ${{ runner.os }}..."
44
+ curl -sSL "$BINARY_URL" -o "$BINARY_PATH"
45
+
46
+ # Make binary executable (not needed for Windows)
47
+ if [[ "${{ runner.os }}" != "Windows" ]]; then
48
+ chmod +x "$BINARY_PATH"
49
+ fi
50
+
51
+ "$BINARY_PATH" junit upload --service coder ./gotests.xml \
26
52
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
27
53
env :
28
54
DATADOG_API_KEY : ${{ inputs.api-key }}
You can’t perform that action at this time.
0 commit comments