Skip to content

Commit fdc1bce

Browse files
authored
Manually update this workflow from the template. (#66)
1 parent b4db67f commit fdc1bce

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/update-workflows.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@ jobs:
5151
\ workflows from templates.\"\ngit push -u origin \"${NEW_BRANCH}\"\n\n# Create\
5252
\ a PR.\nPRBODY=\"Updating from templates.\"\nif [ \"${{ steps.update.outputs.failed\
5353
\ }}\" == \"true\" ] ; then\n PRBODY=$(printf \"%s\\n\\n%s\" \"${PRBODY}\"\
54-
\ \"@IronCoreLabs/ops patch didn't apply cleanly.\")\nfi\ncurl -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.\nPR=$(jq\
61-
\ -r '.issue_url' < pr.json)\ncurl -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.\")\nfi\n# https://github.com/IronCoreLabs/depot/issues/333\n\
55+
echo \"${PRBODY}\" > body.txt\necho -n \"${NEW_BRANCH}\" > head.txt\necho\
56+
\ ${{ steps.update.outputs.failed }} | \\\njq --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\": .}' | \\\ncurl -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.\nPR=$(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

Comments
 (0)