Skip to content

Commit

Permalink
Fix how branches input is converted to JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Jan 31, 2025
1 parent a90d550 commit 503c8dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/multi_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
- name: Convert branches input to JSON array
id: set_branches
run: |
JSON_ARRAY=$(echo "[\"$(echo ${{ inputs.branches }} | tr ' ' '\",\"')\"]")
branches_array=(${{ inputs.branches }})
quoted_branches=$(printf '"%s",' "${branches_array[@]}")
JSON_ARRAY="[${quoted_branches%,}]"
echo "branches=$JSON_ARRAY" >> "$GITHUB_OUTPUT"
echo "Branches: $JSON_ARRAY" >> "$GITHUB_STEP_SUMMARY"
Expand Down

0 comments on commit 503c8dd

Please sign in to comment.