From 1d259542747b41c2fd7f89d6ae17ccfbdfdf6f67 Mon Sep 17 00:00:00 2001 From: Eugene Grebenschikov Date: Wed, 18 Dec 2024 17:23:37 -0800 Subject: [PATCH] Download the latest otelcol for CI tests. Co-authored-by: Pavel Pautov --- .github/workflows/ubuntu.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 1a8edac..0f328d2 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -36,9 +36,11 @@ jobs: make -j $(nproc) - name: Download otelcol run: | - curl -sLo - https://github.com/\ - open-telemetry/opentelemetry-collector-releases/releases/download/\ - v0.115.1/otelcol_0.115.1_linux_amd64.tar.gz | tar -xzv + LATEST=open-telemetry/opentelemetry-collector-releases/releases/latest + TAG=$(curl -s https://api.github.com/repos/${LATEST} | + jq -r .tag_name) + curl -sLo - https://github.com/${LATEST}/download/\ + otelcol_${TAG:1}_linux_amd64.tar.gz | tar -xzv - name: Install test dependencies run: pip install -r tests/requirements.txt - name: Run tests