44
44
echo "FILENAME=borgerpc-kiosk-amd64-dev" >> $GITHUB_ENV
45
45
fi
46
46
47
- - name : Build OS2borgerpc image
47
+ - name : Build OS2borgerpc Kiosk image
48
48
run : |
49
49
cd image && ./build_os2borgerpc_kiosk_image.sh ../${{ env.UBUNTU_ISO_FILENAME }} $FILENAME
50
50
@@ -63,12 +63,22 @@ jobs:
63
63
AWS_ACCESS_KEY_ID : ${{ secrets.HETZNER_OS2BORGERPC_ACCESS_KEY }}
64
64
AWS_SECRET_ACCESS_KEY : ${{ secrets.HETZNER_OS2BORGERPC_SECRET_KEY }}
65
65
66
- - name : Add download URL to release notes
66
+ - name : Append download URL to release notes
67
67
if : github.event_name == 'release'
68
68
run : |
69
+ # Fetch the current release notes
70
+ CURRENT_BODY=$(curl -s \
71
+ -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
72
+ https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }} \
73
+ | jq -r .body)
74
+
75
+ # Update the release notes with new content appended, jq used to escape the JSON properly.
69
76
DOWNLOAD_URL="https://fsn1.your-objectstorage.com/os2borgerpc/borgerpc-os-images/${{ env.FILENAME }}.iso"
77
+ UPDATED_BODY=$(printf "%s\r\n## Download the ISO\r\n%s" "$CURRENT_BODY" "$DOWNLOAD_URL" | jq -Rs .)
78
+
79
+ # Patch the release notes
70
80
curl -X PATCH \
71
81
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
72
82
-H "Content-Type: application/json" \
73
- -d "{\"body\": \"Download the ISO here: $DOWNLOAD_URL\" }" \
83
+ -d "{\"body\": $UPDATED_BODY }" \
74
84
https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}
0 commit comments