Skip to content

Commit baf7ff2

Browse files
authored
Cb 33683 Updated internal release job to install GH CLI on Debian Trixie container (#121)
CB-33683 Release job fixes for Debian Trixie.
1 parent 96bf255 commit baf7ff2

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

Makefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ GOLANG_CONTAINER?=docker-private.infra.cloudera.com/cloudera_thirdparty/golang
4141
deps:
4242
ifeq ($(shell uname),Linux)
4343
ifeq (, $(shell which gh))
44-
apt-get update
45-
apt-get -y install software-properties-common
46-
apt-key adv --keyserver keyserver.ubuntu.com --recv-key 23F3D4EA75716059
47-
apt-add-repository https://cli.github.com/packages
48-
apt update
49-
apt -y install gh
44+
# Based on the official GH CLI docs: https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian
45+
# Snapshot: https://web.archive.org/web/20260710093431/https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian
46+
(type -p wget >/dev/null || (apt update && apt install wget -y)) \
47+
&& mkdir -p /etc/apt/keyrings \
48+
&& wget -nv -O /etc/apt/keyrings/githubcli-archive-keyring.gpg https://cli.github.com/packages/githubcli-archive-keyring.gpg \
49+
&& mkdir -p /etc/apt/sources.list.d \
50+
&& echo "deb [arch=$$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list \
51+
&& apt update \
52+
&& apt install gh -y
5053
endif
5154
endif
5255

0 commit comments

Comments
 (0)