Skip to content

Commit f21541c

Browse files
authored
chore: update gh cli in dogfood Dockerfile (#8489)
1 parent 837f88d commit f21541c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dogfood/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,10 @@ RUN DOCKER_BUILDX_VERSION=$(curl -s "https://api.github.com/repos/docker/buildx/
176176

177177
# See https://github.com/cli/cli/issues/6175#issuecomment-1235984381 for proof
178178
# the apt repository is unreliable
179-
RUN curl -L https://github.com/cli/cli/releases/download/v2.14.7/gh_2.14.7_linux_amd64.deb -o gh.deb && \
180-
dpkg -i gh.deb
179+
RUN GH_CLI_VERSION=$(curl -s "https://api.github.com/repos/cli/cli/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') && \
180+
curl -L https://github.com/cli/cli/releases/download/v${GH_CLI_VERSION}/gh_${GH_CLI_VERSION}_linux_amd64.deb -o gh.deb && \
181+
dpkg -i gh.deb && \
182+
rm gh.deb
181183

182184
# Install Lazygit
183185
# See https://github.com/jesseduffield/lazygit#ubuntu

0 commit comments

Comments
 (0)