mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
Merge pull request #790 from flatcar/dongsu/gh-fetch-remote
.github: check for remote branches with git ls-remote
This commit is contained in:
commit
3b3fbccc74
3
.github/workflows/common.sh
vendored
3
.github/workflows/common.sh
vendored
@ -66,8 +66,7 @@ function prepare_git_repo() {
|
||||
|
||||
function check_remote_branch() {
|
||||
local target_branch="${1}"
|
||||
|
||||
if git -C "${SDK_OUTER_TOPDIR}" show-ref "remotes/origin/${target_branch}"; then
|
||||
if git -C "${SDK_OUTER_TOPDIR}" ls-remote --refs --heads --exit-code origin "${target_branch}" >/dev/null; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user