Skip to content

Commit

Permalink
ci: set GH_TOKEN to remove warnings (#13369)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Jun 10, 2024
1 parent 66e5b64 commit 5fc2102
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 5fc2102

Please sign in to comment.