Skip to content

Commit

Permalink
Skip if no tag defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Wittgen committed Aug 27, 2024
1 parent b212a1c commit 5912090
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,14 @@ jobs:
prev_sha=$(git rev-list -1 "$prev_tag")
echo "Previous tag ${prev_tag} (${prev_sha})"
current_tag=${GITHUB_REF#refs/tags/}
if [ -z "$current_tag" ]; then
echo "Current ref is not a tag, skipping upload."
echo "skip=true" >> "$GITHUB_ENV"
exit 0
fi
current_sha=$(git rev-list -1 "$current_tag")
echo "Current tag ${current_tag} (${current_sha})"
if [ -z ${current_tag} ] || [ "$current_sha" = "$prev_sha" ]; then
if [ "$current_sha" = "$prev_sha" ]; then
echo "Skip upload"
echo "skip=true" >> "$GITHUB_ENV"
else
Expand Down

0 comments on commit 5912090

Please sign in to comment.