Skip to content

Update compileSDK to 35 #36

Update compileSDK to 35

Update compileSDK to 35 #36

name: Notify
permissions:
contents: read
on:
push:
branches:
- master
jobs:
notify:
name: Notify via Telegram
runs-on: ubuntu-latest
steps:
- name: Notify
env:
COMMITS: ${{ toJson(github.event.commits) }}
TEMPLATE: '.[] | "<a href=\"\(.url)\">\(.id[:8])</a> • <a href=\"https://github.com/\(.author.username | @html)\">\(.author.username | @html)</a>
\(.message | gsub("(?<a>[<>&\"])"; .a|@html))
"'
run: |
(
printf '🎧 <a href="https://github.com/IamRezaMousavi/Banafsh">Banafsh</a>\n\n'
printenv COMMITS | jq -r "$TEMPLATE"
printf '🆔: @iamrezamousaviapp'
) | \
jq -R --slurp '{
text: .,
disable_web_page_preview: true,
chat_id: "${{ secrets.TELEGRAM_CHAT_ID }}",
message_thread_id: 15,
parse_mode: "HTML"
}' | \
curl -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage \
-H 'Content-Type: application/json' \
--data-binary @-