Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release failing when there were duplicate tags #674

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ jobs:
tags="${tags} ${NIGHTLY_VERSION} ${NIGHTLY_BRANCH} latest"
fi
fi
tags=$(echo "${tags}" | xargs -n1 | sort -u | xargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not know, xargs can be used that way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to man xargs:

[...] and executes the command (default is echo) [...]

echo "Set tags to: $tags"
echo "TAGS=${tags}" >> $GITHUB_ENV

Expand Down Expand Up @@ -200,6 +201,7 @@ jobs:
else
tags="nightly"
fi
tags=$(echo "${tags}" | xargs -n1 | sort -u | xargs)
echo "Going to publish with tags: $tags"
echo "TAGS=${tags}" >> $GITHUB_ENV

Expand Down
Loading