Compare commits

...
7 Commits
7 ... 14
Author SHA1 Message Date
nezumi ae43197aa0 update config 2025-01-22 18:59:05 +07:00
nezumi c2fe93675e update config 2025-01-22 18:17:08 +07:00
nezumi aee01f1ca5 update config 2025-01-22 17:55:20 +07:00
nezumi 679631315e update config 2025-01-22 17:35:52 +07:00
Loi Phan a2ca664121 Update build.yml 2025-01-21 00:14:45 +07:00
nezumi 94c8ce77a9 update config 2025-01-18 09:41:09 +07:00
Loi Phan aece463380 Update build.yml 2025-01-18 09:26:41 +07:00
3 changed files with 65 additions and 2 deletions
+62 -1
View File
@@ -114,7 +114,7 @@ jobs:
run: |
cd build || { echo "build folder not found"; exit 1; }
TG_CHAT="@rvc_magisk"
TG_CHAT="-1002417137882"
NL=$'\n'
APKS=""
MODULES=""
@@ -145,3 +145,64 @@ jobs:
MSG=${MSG:0:9450}
POST="https://api.telegram.org/bot${TG_TOKEN}/sendMessage"
curl -X POST --data-urlencode "parse_mode=Markdown" --data-urlencode "disable_web_page_preview=true" --data-urlencode "text=${MSG}" --data-urlencode "chat_id=${TG_CHAT}" "$POST"
- name: Report to Discord
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
if: env.DISCORD_WEBHOOK_URL != null
run: |
cd build || { echo "build folder not found"; exit 1; }
NL=$'\n'
APKS=""
MODULES=""
for OUTPUT in *; do
DL_URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/download/${{ steps.next_ver_code.outputs.NEXT_VER_CODE }}/${OUTPUT}"
if [[ $OUTPUT = *.apk ]]; then
APKS+="${NL}- [${OUTPUT}](${DL_URL})"
elif [[ $OUTPUT = *.zip ]]; then
MODULES+="${NL}- [${OUTPUT}](${DL_URL})"
fi
done
MODULES=${MODULES#"$NL"}
APKS=${APKS#"$NL"}
BODY="$(sed 's/^\* \*\*/- \*\*/g; s/^\* `/- \*\*/g; s/`/\*/g; s/^\* /\-/g; s/\*\*/\*/g; s/###//g; s/^- /- /g; /^==/d;' ../build.md)"
MSG="**New build is ready!**
${BODY}
**Download Links:**
**Modules:**
${MODULES}
**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"
+1 -1
View File
@@ -46,5 +46,5 @@ jobs:
permissions: write-all
needs: check
uses: ./.github/workflows/build.yml
if: ${{ needs.check.outputs.SHOULD_BUILD == 1 }}
if: ${{ needs.check.outputs.SHOULD_BUILD == 0 }}
secrets: inherit
+2
View File
@@ -46,6 +46,8 @@ cli-source = "inotia00/revanced-cli"
rv-brand = "ReVanced Extended"
build-mode = "both"
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube"
included-patches = "'Custom header for YouTube'"
excluded-patches = "'Custom branding icon for YouTube' 'Custom branding name for YouTube'"
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.youtube"
[Reddit-Extended]