diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 68d9369fb8..be13a7314b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -21,8 +21,8 @@ parts: version="9999" kata_url="https://github.com/kata-containers/kata-containers" - if echo "${GITHUB_REF}" | grep -q -E "^refs/tags"; then - version=$(echo ${GITHUB_REF} | cut -d/ -f3) + if echo "${GITHUB_REF:-}" | grep -q -E "^refs/tags"; then + version=$(echo ${GITHUB_REF:-} | cut -d/ -f3) git checkout ${version} fi