Skip to content

Commit ff7adaa

Browse files
committed
consume OPS_BUILDKITE_TOKEN within workflow
1 parent 6c3621f commit ff7adaa

2 files changed

Lines changed: 60 additions & 15 deletions

File tree

.github/workflows/failed-test-investigator.lock.yml

Lines changed: 38 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/failed-test-investigator.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,28 @@ network:
6060
- elastic.litellm-prod.ai
6161
sandbox:
6262
agent: awf # Migrated from deprecated network setting
63+
steps:
64+
- name: Install Buildkite CLI and export BUILDKITE_API_TOKEN
65+
env:
66+
BK_VERSION: 3.44.0
67+
BK_SHA256: 88867c0b983ad2afe1efc26f0df6b46b5673577c1aea95eba76992636fb9abe9
68+
OPS_BUILDKITE_TOKEN: ${{ secrets.OPS_BUILDKITE_TOKEN }}
69+
run: |
70+
set -euo pipefail
71+
tmp="$(mktemp -d)"
72+
url="https://github.com/buildkite/cli/releases/download/v${BK_VERSION}/bk_${BK_VERSION}_linux_amd64.tar.gz"
73+
curl -fsSL --retry 3 --retry-delay 2 "${url}" -o "${tmp}/bk.tgz"
74+
echo "${BK_SHA256} ${tmp}/bk.tgz" | sha256sum -c -
75+
tar -xzf "${tmp}/bk.tgz" -C "${tmp}" bk
76+
install -d "${RUNNER_TEMP}/gh-aw/mcp-cli/bin"
77+
install -m 0755 "${tmp}/bk" "${RUNNER_TEMP}/gh-aw/mcp-cli/bin/bk"
78+
"${RUNNER_TEMP}/gh-aw/mcp-cli/bin/bk" --version
79+
if [ -z "${OPS_BUILDKITE_TOKEN:-}" ]; then
80+
echo "::error::OPS_BUILDKITE_TOKEN secret is not set" >&2
81+
exit 1
82+
fi
83+
echo "BUILDKITE_API_TOKEN=${OPS_BUILDKITE_TOKEN}" >> "${GITHUB_ENV}"
84+
6385
safe-outputs:
6486
noop:
6587
report-as-issue: false

0 commit comments

Comments
 (0)