Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbb80dee

Browse files
committed
download the datadog-ci binary directly
1 parenta646478 commitbb80dee

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

‎.github/actions/upload-datadog/action.yaml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ runs:
1010
steps:
1111
-shell:bash
1212
run:|
13+
set -e
14+
1315
owner=${{ github.repository_owner }}
1416
echo "owner: $owner"
1517
if [[ $owner != "coder" ]]; then
@@ -21,8 +23,32 @@ runs:
2123
echo "No API key provided, skipping..."
2224
exit 0
2325
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 \
2652
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
2753
env:
2854
DATADOG_API_KEY:${{ inputs.api-key }}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp