From c23f1a95815f09f48612bc1be643560611813603 Mon Sep 17 00:00:00 2001 From: frcroth Date: Mon, 18 Mar 2024 10:46:26 +0100 Subject: [PATCH] Do we have a GH Token? --- .circleci/config.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index cf472ab8b37..c063d7af55d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,6 +24,21 @@ jobs: echo "export NORMALIZED_BRANCH=master" >> $BASH_ENV echo "export DOCKER_TAG=${CIRCLE_TAG}" >> $BASH_ENV fi + - run: + name: Test GH Token + command: | + if [ -n "$GH_TOKEN" ]; then + echo "GH_TOKEN is set" + sudo mkdir -p -m 755 /etc/apt/keyrings && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ + && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ + && sudo apt update \ + && sudo apt install gh -y + gh auth status + else + echo "GH_TOKEN is not set" + exit 1 + fi - run: name: Build webknossos-dev docker image command: |