@@ -12,13 +12,12 @@ runs:
1212run :|
1313 set -e
1414
15- owner=${{ github.repository_owner }}
16- echo "owner: $owner"
17- if [[ $owner != "coder" ]]; then
15+ echo "owner: $REPO_OWNER"
16+ if [[ "$REPO_OWNER" != "coder" ]]; then
1817 echo "Not a pull request from the main repo, skipping..."
1918 exit 0
2019 fi
21- if [[ -z "${{ inputs.api-key } }" ]]; then
20+ if [[ -z "${DATADOG_API_KEY }" ]]; then
2221 # This can happen for dependabot.
2322 echo "No API key provided, skipping..."
2423 exit 0
@@ -31,37 +30,38 @@ runs:
3130
3231 TMP_DIR=$(mktemp -d)
3332
34- if [[ "${{ runner.os } }" == "Windows" ]]; then
33+ if [[ "${RUNNER_OS }" == "Windows" ]]; then
3534 BINARY_PATH="${TMP_DIR}/datadog-ci.exe"
3635 BINARY_URL="https://github.com/DataDog/datadog-ci/releases/download/${BINARY_VERSION}/datadog-ci_win-x64"
37- elif [[ "${{ runner.os } }" == "macOS" ]]; then
36+ elif [[ "${RUNNER_OS }" == "macOS" ]]; then
3837 BINARY_PATH="${TMP_DIR}/datadog-ci"
3938 BINARY_URL="https://github.com/DataDog/datadog-ci/releases/download/${BINARY_VERSION}/datadog-ci_darwin-arm64"
40- elif [[ "${{ runner.os } }" == "Linux" ]]; then
39+ elif [[ "${RUNNER_OS }" == "Linux" ]]; then
4140 BINARY_PATH="${TMP_DIR}/datadog-ci"
4241 BINARY_URL="https://github.com/DataDog/datadog-ci/releases/download/${BINARY_VERSION}/datadog-ci_linux-x64"
4342 else
44- echo "Unsupported OS: ${{ runner.os }} "
43+ echo "Unsupported OS: $RUNNER_OS "
4544 exit 1
4645 fi
4746
48- echo "Downloading DataDog CI binary version ${BINARY_VERSION} for ${{ runner.os }} ..."
47+ echo "Downloading DataDog CI binary version ${BINARY_VERSION} for $RUNNER_OS ..."
4948 curl -sSL "$BINARY_URL" -o "$BINARY_PATH"
5049
51- if [[ "${{ runner.os } }" == "Windows" ]]; then
50+ if [[ "${RUNNER_OS }" == "Windows" ]]; then
5251 echo "$BINARY_HASH_WINDOWS $BINARY_PATH" | sha256sum --check
53- elif [[ "${{ runner.os } }" == "macOS" ]]; then
52+ elif [[ "${RUNNER_OS }" == "macOS" ]]; then
5453 echo "$BINARY_HASH_MACOS $BINARY_PATH" | shasum -a 256 --check
55- elif [[ "${{ runner.os } }" == "Linux" ]]; then
54+ elif [[ "${RUNNER_OS }" == "Linux" ]]; then
5655 echo "$BINARY_HASH_LINUX $BINARY_PATH" | sha256sum --check
5756 fi
5857
5958 # Make binary executable (not needed for Windows)
60- if [[ "${{ runner.os } }" != "Windows" ]]; then
59+ if [[ "${RUNNER_OS }" != "Windows" ]]; then
6160 chmod +x "$BINARY_PATH"
6261 fi
6362
6463 "$BINARY_PATH" junit upload --service coder ./gotests.xml \
65- --tags os:${{runner.os}} --tags runner_name:${{runner.name}}
64+ --tags" os:${RUNNER_OS}" --tags" runner_name:${RUNNER_NAME}"
6665env :
66+ REPO_OWNER :${{ github.repository_owner }}
6767DATADOG_API_KEY :${{ inputs.api-key }}