From f21541c0e4dd0524a2ef54341304777bf3d3e219 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Thu, 13 Jul 2023 11:49:43 +0300 Subject: [PATCH] chore: update gh cli in dogfood Dockerfile (#8489) --- dogfood/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dogfood/Dockerfile b/dogfood/Dockerfile index 6f10496753..47dd89a5b3 100644 --- a/dogfood/Dockerfile +++ b/dogfood/Dockerfile @@ -176,8 +176,10 @@ RUN DOCKER_BUILDX_VERSION=$(curl -s "https://api.github.com/repos/docker/buildx/ # See https://github.com/cli/cli/issues/6175#issuecomment-1235984381 for proof # the apt repository is unreliable -RUN curl -L https://github.com/cli/cli/releases/download/v2.14.7/gh_2.14.7_linux_amd64.deb -o gh.deb && \ - dpkg -i gh.deb +RUN GH_CLI_VERSION=$(curl -s "https://api.github.com/repos/cli/cli/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') && \ + curl -L https://github.com/cli/cli/releases/download/v${GH_CLI_VERSION}/gh_${GH_CLI_VERSION}_linux_amd64.deb -o gh.deb && \ + dpkg -i gh.deb && \ + rm gh.deb # Install Lazygit # See https://github.com/jesseduffield/lazygit#ubuntu