Skip to content

Commit

Permalink
Try using bash parameter expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
katybaulch committed Apr 30, 2024
1 parent 575da35 commit 219fc7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ runs:
echo "Determining whether user selected an auto-tag option..."
echo "Using GitHub script to get PR info..."
pr_body=$("${{ fromJson(steps.get_pr_data.outputs.result).body }}" | awk '/^## Proposed version/,/^Notes:/ {if (!/^## Proposed version/ && !/^Notes:/) print}')
pr_body="${{ fromJson(steps.get_pr_data.outputs.result).body }}"
pr_body_esc="${pr_body@Q}"
tag_pr_body_section=$("${pr_body_esc}" | awk '/^## Proposed version/,/^Notes:/ {if (!/^## Proposed version/ && !/^Notes:/) print}')
echo "Dumping PR body to file..."
pr_dump_file="./tmp_pr_body_dump.txt"
touch "${pr_dump_file}"
printf '%q\n' "${pr_body}" > "${pr_dump_file}"
printf '%q\n' "${tag_pr_body_section}" > "${pr_dump_file}"
cat "${pr_dump_file}"
script_output=$("${{ github.action_path }}/auto-tag.sh" "${pr_dump_file}"
Expand Down

0 comments on commit 219fc7a

Please sign in to comment.