build: set the default branch of the ephemeral repo for publishing build artifacts to main (#45974)

It looks like because the primary branch for our ephemeral repos doesn't match the build repos
we are pushing to it causes errors around shallow clones.  This attempts to prevent this.

PR Close #45974
This commit is contained in:
Joey Perrott
2022-05-12 19:03:13 +00:00
committed by Jessica Janiuk
parent 9cd8e50848
commit d7ad280941
+1 -1
View File
@@ -47,7 +47,7 @@ function publishRepo {
mkdir -p $REPO_DIR
(
cd $REPO_DIR && \
git init && \
git init -b main && \
git remote add origin $REPO_URL && \
# use the remote branch if it exists
if git ls-remote --exit-code origin ${BRANCH}; then