mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 18:06:59 +02:00
.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:
parent
b7631d8654
commit
66920fda77
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user