From 07b8379a57c90ffe87c39fae944dc02c0c179f15 Mon Sep 17 00:00:00 2001 From: Matthias Wittgen Date: Thu, 19 Dec 2024 13:02:06 -0800 Subject: [PATCH] Fix check upload workflow --- .github/workflows/build.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ecbb4f7..0f6ea20 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -82,13 +82,14 @@ jobs: weekly_sha=$(git tag -l 'w.*' | while read tag; do git rev-list -n 1 "${tag}" done) - + echo "Weekly tag SHA ${weekly_sha}" # Extract the current tag and its SHA current_tag=${GITHUB_REF#refs/tags/} - current_sha=$(git rev-list -1 "${current_tag}") - + echo "Current tag: ${current_tag}" + current_sha=$(git rev-list -1 "${current_tag}") || echo "no_value" + echo "Current sha: ${current_sha}" # Count occurrences of the current SHA in the weekly SHA list - n=$(echo "${weekly_sha}" | grep -c "${current_sha}") + n=$(echo "${weekly_sha}" | grep -c "${current_sha}") || echo "0" echo "Current tag ${current_tag} (${current_sha}) SHA found ${n} time(s)" # Determine whether to skip the upload based on the count