From 32f2ff181cec1bc13f8af2975523a58a587cae75 Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Wed, 15 Jan 2020 15:24:59 +0000 Subject: [PATCH] actions: check for packaging before clone If already exit do not clone it, but fetch. Fetch will keep repository is up-to-date before checkout. Fixes: #911 Signed-off-by: Jose Carlos Venegas Munoz --- kata-deploy/action/test-kata.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kata-deploy/action/test-kata.sh b/kata-deploy/action/test-kata.sh index 1cee22f8d4..ff24dff07f 100755 --- a/kata-deploy/action/test-kata.sh +++ b/kata-deploy/action/test-kata.sh @@ -103,8 +103,9 @@ function test_kata() { # 2. From kata-containers: when creating a release, the appropriate packaging repository is # not yet part of the workspace, and we will need to clone if [[ ! -d ./kata-deploy ]]; then - git clone https://github.com/kata-containers/packaging packaging + [[ -d packaging ]] || git clone https://github.com/kata-containers/packaging packaging cd packaging + git fetch git checkout $PKG_SHA fi