Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
fix: fix jq error (#218)
Browse files Browse the repository at this point in the history
Co-authored-by: falumpaset <[email protected]>
  • Loading branch information
Falumpaset and falumpaset authored Aug 17, 2023
1 parent 39b8786 commit fe65d02
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,17 @@ jobs:
PR_LABELS: ${{ steps.pr_labels.outputs.PR_LABELS }}
run: |
# Check if either "type:feature" or "type:fix" label exists in the list
if echo "$PR_LABELS" | jq -e '.[] | select(. == "type:feature" or . == "type:fix")' > /dev/null; then
if echo "$PR_LABELS" | jq -e '.[] | select(. == "type:breaking" or . == "type:feature" or . == "type:fix")' > /dev/null; then
# Determine the tag based on the label found
VERSION_BUMP=$(echo "$PR_LABELS" |jq -r 'if any(.[]; . == "type:breaking") then "version:major" elif jq -r 'if any(.[]; . == "type:feature") then "version:minor" elif any(.[]; . == "type:chore") or any(.[]; . == "type:fix") then "version:patch" else empty end')
VERSION_BUMP=$(echo "$PR_LABELS" | jq -r 'if any(.[]; . == "type:breaking") then "version:major" elif any(.[]; . == "type:feature") then "version:minor" elif any(.[]; . == "type:chore") or any(.[]; . == "type:fix") then "version:patch" else empty end')
# Output the Version Tag
echo "VERSION_BUMP=$VERSION_BUMP" >> "$GITHUB_OUTPUT"
else
echo "No 'type:breaking', 'type:feature' or 'type:fix' label found."
echo "No Version Bump"
fi
- name: Check for open PR to Release Branch
id: check_pr
Expand Down

0 comments on commit fe65d02

Please sign in to comment.