From 71510fb11722b1a91155a0faa181d1ebcd32226b Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Mon, 18 Jul 2022 20:12:06 +0200 Subject: [PATCH] .github: Specify remote when checking out c-o/p-s ref in workflow When the specified remote contains a same-named branch as origin, the checkout fails with "fatal: 'X' matched multiple (Y) remote tracking branches". Add the remote name as prefix to make the reference unambiguous. --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 43666ccd98..e008c7cbb7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -112,7 +112,7 @@ jobs: [[ "$REMOTE" == "https:*" ]] || REMOTE="https://github.com/${COREOS_REMOTE}" git -C "$REPO_PATH" remote add test "$REMOTE" git -C "$REPO_PATH" fetch test - git -C "$REPO_PATH" checkout "${COREOS_REF}" + git -C "$REPO_PATH" checkout "test/${COREOS_REF}" fi if [ "${PORTAGE_REMOTE}" != "" -a "${PORTAGE_REF}" != "" ] @@ -122,7 +122,7 @@ jobs: [[ "$REMOTE" == "https:*" ]] || REMOTE="https://github.com/${PORTAGE_REMOTE}" git -C "$REPO_PATH" remote add test "$REMOTE" git -C "$REPO_PATH" fetch test - git -C "$REPO_PATH" checkout "${PORTAGE_REF}" + git -C "$REPO_PATH" checkout "test/${PORTAGE_REF}" fi - name: Build packages