ci: checkout FETCH_HEAD instead of GIT_REF

GIT_REF can point to a ref that it not part of a branch and can not
easily be checked out (like a GitHub PR). Checking out FETCH_HEAD after
fetching the GIT_REF works.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-09-22 11:25:51 +02:00
parent 5f9222d7ee
commit b1d7c83c16

View File

@ -14,4 +14,4 @@ set -e
git init .
git remote add origin "${GIT_REPO}"
git fetch origin "${GIT_REF}"
git checkout "${GIT_REF}"
git checkout FETCH_HEAD