From 5fc2102c40ea652789a1e19ea730ec03d6c09171 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 10 Jun 2024 11:15:28 +0200 Subject: [PATCH] ci: set GH_TOKEN to remove warnings (#13369) --- .buildkite/hooks/pre-command | 8 ++++++++ .github/workflows/ci.yml | 1 + 2 files changed, 9 insertions(+) diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 2b6f463b662..4d7c6f00861 100755 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -84,6 +84,14 @@ if command -v docker &>/dev/null; then unset DOCKER_USERNAME_SECRET DOCKER_PASSWORD_SECRET fi +echo "--- Setting up the :github: environment..." +# release.mk uses gh cli to know the current release tag. release.mk is used by the root Makefile +# regardless is explicitly used, so it's loaded with the include directive. +# this will avoid printing warnings about the missing gh cli configurations +# VAULT_GITHUB_TOKEN is a primitive env variable created by the Buildkite automation. +GH_TOKEN="${VAULT_GITHUB_TOKEN}" +export GH_TOKEN + echo "--- Setting up the :golang: environment..." GO_VERSION=$(cat .go-version) WORKSPACE=$(git rev-parse --show-toplevel) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87d9e6c43fb..d7305551999 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,7 @@ jobs: GOTESTFLAGS: "-v -json" OUTPUT_JSON_FILE: "build/TEST-go-system_tests.out.json" OUTPUT_JUNIT_FILE: "build/TEST-go-system_tests.xml" + GH_TOKEN: ${{ github.token }} run: | go run -modfile=tools/go.mod gotest.tools/gotestsum \ --no-color -f standard-quiet --jsonfile "$OUTPUT_JSON_FILE" --junitfile "$OUTPUT_JUNIT_FILE" \