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: |