We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1eef14c commit c512532Copy full SHA for c512532
1 file changed
.github/workflows/cli-release-staging.yml
@@ -145,8 +145,8 @@ jobs:
145
RELEASES=$(curl -s -H "Authorization: token ${{ secrets.CODEBUFF_GITHUB_TOKEN }}" \
146
"${GITHUB_API_URL}/releases?per_page=100")
147
148
- if echo "$RELEASES" | jq -e . >/dev/null 2>&1; then
149
- OLD=$(echo "$RELEASES" | jq -r '.[] | select(.prerelease == true and .created_at < "'$ONE_WEEK_AGO'" and (.tag_name | test("^v[0-9].*-beta\\.[0-9]+$"))) | "\(.id):\(.tag_name)"')
+ if echo "$RELEASES" | jq -e 'type == "array"' >/dev/null 2>&1; then
+ OLD=$(echo "$RELEASES" | jq -r --arg cutoff "$ONE_WEEK_AGO" '.[] | select(.prerelease == true and .created_at < $cutoff and (.tag_name | test("^v[0-9].*-beta\\.[0-9]+$"))) | "\(.id):\(.tag_name)"')
150
151
if [ -n "$OLD" ]; then
152
echo "Deleting old prereleases:"
0 commit comments