@@ -51,13 +51,15 @@ jobs:
51
51
\ workflows from templates.\"\n git push -u origin \" ${NEW_BRANCH}\"\n\n # Create\
52
52
\ a PR.\n PRBODY=\" Updating from templates.\"\n if [ \" ${{ steps.update.outputs.failed\
53
53
\ }}\" == \" true\" ] ; then\n PRBODY=$(printf \" %s\\ n\\ n%s\" \" ${PRBODY}\" \
54
- \ \" @IronCoreLabs/ops patch didn't apply cleanly.\" )\n fi\n curl -Ss -X POST\
55
- \ \\\n -H \" Authorization: token ${{ secrets.WORKFLOW_PAT }}\" \\\n -H \" \
56
- Content-Type: application/json\" \\\n --data '{\" title\" : \" Update workflows\
57
- \ from templates\" ,\n \" head\" : \" '${NEW_BRANCH}'\" ,\n \" base\" : \" \
58
- main\" ,\n \" body\" : '$(echo \" ${PRBODY}\" | jq -aRs .)',\n \" draft\" \
59
- : ${{ steps.update.outputs.failed }}\n }' \\\n https://api.github.com/repos/${{\
60
- \ github.repository }}/pulls \\\n | tee pr.json\n\n # Label the PR.\n PR=$(jq\
61
- \ -r '.issue_url' < pr.json)\n curl -Ss -X POST \\\n -H \" Authorization: token\
62
- \ ${{ secrets.WORKFLOW_PAT }}\" \\\n -H \" Content-Type: application/json\" \
63
- \ \\\n --data '{\" labels\" : [\" ops\" ]}' \\\n \" ${PR}/labels\"\n "
54
+ \ \" @IronCoreLabs/ops patch didn't apply cleanly.\" )\n fi\n # https://github.com/IronCoreLabs/depot/issues/333\n \
55
+ echo \" ${PRBODY}\" > body.txt\n echo -n \" ${NEW_BRANCH}\" > head.txt\n echo\
56
+ \ ${{ steps.update.outputs.failed }} | \\\n jq --rawfile body body.txt --rawfile\
57
+ \ head head.txt \\\n '{\" title\" : \" Update workflows from templates\" ,\n \
58
+ \ \" base\" : \" main\" ,\n \" head\" : $head,\n \" body\" : $body,\n \
59
+ \ \" draft\" : .}' | \\\n curl -Ss -X POST \\\n -H \" Authorization: token ${{\
60
+ \ secrets.WORKFLOW_PAT }}\" \\\n -H \" Content-Type: application/json\" \\ \
61
+ \n --data @- \\\n https://api.github.com/repos/${{ github.repository }}/pulls\
62
+ \ \\\n | tee pr.json\n\n # Label the PR.\n PR=$(jq -r '.issue_url' < pr.json)\n \
63
+ curl -Ss -X POST \\\n -H \" Authorization: token ${{ secrets.WORKFLOW_PAT\
64
+ \ }}\" \\\n -H \" Content-Type: application/json\" \\\n --data '{\" labels\" \
65
+ : [\" ops\" ]}' \\\n \" ${PR}/labels\"\n "
0 commit comments