Skip to content

Commit

Permalink
Use VAULT_GH_TOKEN to clean-up branches
Browse files Browse the repository at this point in the history
  • Loading branch information
nkammah committed Jan 23, 2024
1 parent 5ab3c72 commit b42244a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions .buildkite/scripts/clean_preview_branches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

set -eo pipefail

set +x
export GITHUB_TOKEN=$(vault read -field=value secret/ci/elastic-docs/docs_preview_cleaner)
set -x

export REPO=git@github.com:elastic/built-docs.git
export IMAGE=docker.elastic.co/docs/build:latest

Expand All @@ -17,7 +13,7 @@ ssh-agent bash -c '
-v ~/.ssh/known_hosts:/root/.ssh/known_hosts:cached,ro \
-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK:cached,ro \
-e SSH_AUTH_SOCK=$SSH_AUTH_SOCK \
-e GITHUB_TOKEN=$GITHUB_TOKEN \
-e GITHUB_TOKEN=$VAULT_GITHUB_TOKEN \
-v /opt/git-mirrors:/opt/git-mirrors:cached,ro \
-e CACHE_DIR=/opt/git-mirrors \
$IMAGE node /docs_build/preview/clean.js $REPO'

0 comments on commit b42244a

Please sign in to comment.