#!/bin/bash

set -euo pipefail

export GITHUB_SECRET=$(vault read -field=value secret/github/pr-webhook-key)
export GITHUB_ZOOXBORS_TOKEN=$(vault read -field=token secret/github/zooxbors)
export BAMBOO_USER=$(vault read -field=username secret/bamboo/pull-request-dispatcher)
export BAMBOO_PW=$(vault read -field=password secret/bamboo/pull-request-dispatcher)

bazel_run //ci/webhooks:server "$@"
