mirror of
https://github.com/Nezumi-2711/revanced-apk-build.git
synced 2026-09-22 13:38:52 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7deb883720 | ||
|
|
be1c20bb87 | ||
|
|
88a00ca413 | ||
|
|
788b36f083 |
+16
-25
@@ -174,35 +174,26 @@ jobs:
|
||||
${BODY}
|
||||
|
||||
**Download Links:**
|
||||
"
|
||||
|
||||
MODULES_MSG="
|
||||
**Modules:**
|
||||
${MODULES}
|
||||
"
|
||||
|
||||
APKS_MSG="
|
||||
**APKs:**
|
||||
${APKS}
|
||||
"
|
||||
|
||||
# Function to split messages properly by ensuring correct Markdown formatting
|
||||
send_discord_message() {
|
||||
local message="$1"
|
||||
local buffer=""
|
||||
while IFS= read -r line || [ -n "$line" ]; do
|
||||
# Check if adding the current line exceeds 2000 characters
|
||||
if [ ${#buffer} -ge 2000 ]; then
|
||||
# Send the current buffer and reset it
|
||||
curl -X POST -H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg content "$buffer" '{content: $content}')" \
|
||||
"$DISCORD_WEBHOOK_URL"
|
||||
buffer=""
|
||||
fi
|
||||
buffer+="${line}\n"
|
||||
done <<< "$message"
|
||||
|
||||
# Send any remaining content in the buffer
|
||||
if [ -n "$buffer" ]; then
|
||||
curl -X POST -H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg content "$buffer" '{content: $content}')" \
|
||||
"$DISCORD_WEBHOOK_URL"
|
||||
fi
|
||||
}
|
||||
|
||||
send_discord_message "$MSG"
|
||||
curl -X POST -H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg content "$MSG" '{content: $content}')" \
|
||||
"$DISCORD_WEBHOOK_URL"
|
||||
|
||||
curl -X POST -H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg content "$MODULES_MSG" '{content: $content}')" \
|
||||
"$DISCORD_WEBHOOK_URL"
|
||||
|
||||
curl -X POST -H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg content "$APKS_MSG" '{content: $content}')" \
|
||||
"$DISCORD_WEBHOOK_URL"
|
||||
|
||||
@@ -46,5 +46,5 @@ jobs:
|
||||
permissions: write-all
|
||||
needs: check
|
||||
uses: ./.github/workflows/build.yml
|
||||
if: ${{ needs.check.outputs.SHOULD_BUILD == 0 }}
|
||||
if: ${{ needs.check.outputs.SHOULD_BUILD == 1 }}
|
||||
secrets: inherit
|
||||
|
||||
Reference in New Issue
Block a user