.github: do not create a pull request when branch exists

If git show-ref returns an error, i.e. the branch already exists,
then we should not create a pull request, but simply return error.
Otherwise, the Github Actions would always try to create pull
requests even when the branch still exists.
This commit is contained in:
Dongsu Park 2022-09-15 11:07:05 +02:00
parent b7631d8654
commit 66920fda77

View File

@ -70,6 +70,7 @@ function checkout_branches() {
if git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" show-ref "remotes/origin/${TARGET_BRANCH}"; then
echo "Target branch already exists. exit.";
return 1
fi
# Each submodule directory should be explicitly set from BASE_BRANCH,