Skip to content

Commit 009e5b5

Browse files
committed
ci: fix sync-upstream.sh
1 parent fbe6e35 commit 009e5b5

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/sync-upstream.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ PREFER_UPSTREAM="${PREFER_UPSTREAM:-1}"
4949
# either, so a failure there says nothing about the sync.
5050
SKIP_MODULES="repl codelab tools"
5151

52+
# This script commits, and a CI runner has no git identity configured, so
53+
# `git commit` there fails with "Author identity unknown". Supply one through
54+
# the environment only when the checkout has none, which leaves an ordinary
55+
# local run using the identity you already have.
56+
if ! git config --get user.email >/dev/null; then
57+
export GIT_AUTHOR_NAME="authzedbot"
58+
export GIT_AUTHOR_EMAIL="infrastructure@authzed.com"
59+
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
60+
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
61+
fi
62+
5263
log() { printf '\n\033[1m==> %s\033[0m\n' "$*"; }
5364
warn() { printf '\033[33m%s\033[0m\n' "$*"; }
5465
die() { printf '\n\033[31merror: %s\033[0m\n' "$*" >&2; exit 1; }

0 commit comments

Comments
 (0)