From 5bac427f27fdf1ff7388e7b019fdbfa767aa9168 Mon Sep 17 00:00:00 2001 From: William Fish Date: Wed, 25 Sep 2024 15:12:22 +0100 Subject: [PATCH] FPO-419: Login with gh auth --- .circleci/bin/ghinstall | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.circleci/bin/ghinstall b/.circleci/bin/ghinstall index fd78d5e..4bef990 100755 --- a/.circleci/bin/ghinstall +++ b/.circleci/bin/ghinstall @@ -12,3 +12,10 @@ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githu sudo apt update sudo apt install gh + +if [ -z "${GITHUB_TOKEN:-}" ]; then + echo "GITHUB_TOKEN is not set" + exit 1 +fi + +gh auth login --with-token <<< "${GITHUB_TOKEN}"