-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from sounddrill31/tg-notifs-2
Telegram Notifications
- Loading branch information
Showing
5 changed files
with
101 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -332,8 +332,18 @@ jobs: | |
# Send Build 'start' notification | ||
- name: Telegram Notification | ||
continue-on-error: true | ||
uses: xinthink/[email protected] | ||
with: | ||
run: | | ||
send_telegram_message() { | ||
local message="$1" | ||
curl -s -X POST \ | ||
https://api.telegram.org/bot$botToken/sendMessage \ | ||
-d chat_id=$chatId \ | ||
-d text="$message" \ | ||
-d parse_mode="Markdown" | ||
} | ||
send_telegram_message "Crave ProjectID: $PROJECTID %0ABuild for ${{ github.event.inputs.DEVICE_NAME }} has been queued %0ACheck Progress at: %0Ahttps://github.com/$(echo "${{ github.repository }}" | sed 's@_@\\_@g')/actions/runs/${{ github.run_id }}" | ||
env: | ||
chatId: ${{ secrets.TELEGRAM_TO }} | ||
botToken: ${{ secrets.TELEGRAM_TOKEN }} | ||
jobStatus: "Build Started" | ||
|
@@ -422,8 +432,19 @@ jobs: | |
- name: Telegram Notification | ||
if: ${{ success() || cancelled() || failure() }} | ||
continue-on-error: true | ||
uses: xinthink/[email protected] | ||
with: | ||
run: | | ||
send_telegram_message() { | ||
local message="$1" | ||
curl -s -X POST \ | ||
https://api.telegram.org/bot$botToken/sendMessage \ | ||
-d chat_id=$chatId \ | ||
-d text="$message" \ | ||
-d parse_mode="Markdown" | ||
} | ||
send_telegram_message "Crave ProjectID: $PROJECTID %0ABuild for ${{ github.event.inputs.DEVICE_NAME }} has status: $jobStatus %0ACheck Progress at: %0Ahttps://github.com/$(echo "${{ github.repository }}" | sed 's@_@\\_@g')/actions/runs/${{ github.run_id }}" | ||
# Todo: error.log link | ||
env: | ||
chatId: ${{ secrets.TELEGRAM_TO }} | ||
botToken: ${{ secrets.TELEGRAM_TOKEN }} | ||
jobStatus: ${{ job.status }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,8 +308,18 @@ jobs: | |
# Send Build 'start' notification | ||
- name: Telegram Notification | ||
continue-on-error: true | ||
uses: xinthink/[email protected] | ||
with: | ||
run: | | ||
send_telegram_message() { | ||
local message="$1" | ||
curl -s -X POST \ | ||
https://api.telegram.org/bot$botToken/sendMessage \ | ||
-d chat_id=$chatId \ | ||
-d text="$message" \ | ||
-d parse_mode="Markdown" | ||
} | ||
send_telegram_message "Crave ProjectID: $PROJECTID %0ABuild for ${{ github.event.inputs.DEVICE_NAME }} has been queued %0ACheck Progress at: %0Ahttps://github.com/$(echo "${{ github.repository }}" | sed 's@_@\\_@g')/actions/runs/${{ github.run_id }}" | ||
env: | ||
chatId: ${{ secrets.TELEGRAM_TO }} | ||
botToken: ${{ secrets.TELEGRAM_TOKEN }} | ||
jobStatus: "Build Started" | ||
|
@@ -449,8 +459,19 @@ jobs: | |
- name: Telegram Notification | ||
if: ${{ success() || cancelled() || failure() }} | ||
continue-on-error: true | ||
uses: xinthink/[email protected] | ||
with: | ||
run: | | ||
send_telegram_message() { | ||
local message="$1" | ||
curl -s -X POST \ | ||
https://api.telegram.org/bot$botToken/sendMessage \ | ||
-d chat_id=$chatId \ | ||
-d text="$message" \ | ||
-d parse_mode="Markdown" | ||
} | ||
send_telegram_message "Crave ProjectID: $PROJECTID %0ABuild for ${{ github.event.inputs.DEVICE_NAME }} has status: $jobStatus %0ACheck Progress at: %0Ahttps://github.com/$(echo "${{ github.repository }}" | sed 's@_@\\_@g')/actions/runs/${{ github.run_id }}" | ||
# Todo: error.log link | ||
env: | ||
chatId: ${{ secrets.TELEGRAM_TO }} | ||
botToken: ${{ secrets.TELEGRAM_TOKEN }} | ||
jobStatus: ${{ job.status }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -262,8 +262,18 @@ jobs: | |
# Send Build 'start' notification | ||
- name: Telegram Notification | ||
continue-on-error: true | ||
uses: xinthink/[email protected] | ||
with: | ||
run: | | ||
send_telegram_message() { | ||
local message="$1" | ||
curl -s -X POST \ | ||
https://api.telegram.org/bot$botToken/sendMessage \ | ||
-d chat_id=$chatId \ | ||
-d text="$message" \ | ||
-d parse_mode="Markdown" | ||
} | ||
send_telegram_message "Crave ProjectID: $PROJECTID %0ABuild for ${{ github.event.inputs.DEVICE_NAME }} has been queued %0ACheck Progress at: %0Ahttps://github.com/$(echo "${{ github.repository }}" | sed 's@_@\\_@g')/actions/runs/${{ github.run_id }}" | ||
env: | ||
chatId: ${{ secrets.TELEGRAM_TO }} | ||
botToken: ${{ secrets.TELEGRAM_TOKEN }} | ||
jobStatus: "Build Started" | ||
|
@@ -351,8 +361,19 @@ jobs: | |
- name: Telegram Notification | ||
if: ${{ success() || cancelled() || failure() }} | ||
continue-on-error: true | ||
uses: xinthink/[email protected] | ||
with: | ||
run: | | ||
send_telegram_message() { | ||
local message="$1" | ||
curl -s -X POST \ | ||
https://api.telegram.org/bot$botToken/sendMessage \ | ||
-d chat_id=$chatId \ | ||
-d text="$message" \ | ||
-d parse_mode="Markdown" | ||
} | ||
send_telegram_message "Crave ProjectID: $PROJECTID %0ABuild for ${{ github.event.inputs.DEVICE_NAME }} has status: $jobStatus %0ACheck Progress at: %0Ahttps://github.com/$(echo "${{ github.repository }}" | sed 's@_@\\_@g')/actions/runs/${{ github.run_id }}" | ||
# Todo: error.log link | ||
env: | ||
chatId: ${{ secrets.TELEGRAM_TO }} | ||
botToken: ${{ secrets.TELEGRAM_TOKEN }} | ||
jobStatus: ${{ job.status }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -262,8 +262,18 @@ jobs: | |
# Send Build 'start' notification | ||
- name: Telegram Notification | ||
continue-on-error: true | ||
uses: xinthink/[email protected] | ||
with: | ||
run: | | ||
send_telegram_message() { | ||
local message="$1" | ||
curl -s -X POST \ | ||
https://api.telegram.org/bot$botToken/sendMessage \ | ||
-d chat_id=$chatId \ | ||
-d text="$message" \ | ||
-d parse_mode="Markdown" | ||
} | ||
send_telegram_message "Crave ProjectID: $PROJECTID %0ABuild for ${{ github.event.inputs.DEVICE_NAME }} has been queued %0ACheck Progress at: %0Ahttps://github.com/$(echo "${{ github.repository }}" | sed 's@_@\\_@g')/actions/runs/${{ github.run_id }}" | ||
env: | ||
chatId: ${{ secrets.TELEGRAM_TO }} | ||
botToken: ${{ secrets.TELEGRAM_TOKEN }} | ||
jobStatus: "Build Started" | ||
|
@@ -351,8 +361,19 @@ jobs: | |
- name: Telegram Notification | ||
if: ${{ success() || cancelled() || failure() }} | ||
continue-on-error: true | ||
uses: xinthink/[email protected] | ||
with: | ||
run: | | ||
send_telegram_message() { | ||
local message="$1" | ||
curl -s -X POST \ | ||
https://api.telegram.org/bot$botToken/sendMessage \ | ||
-d chat_id=$chatId \ | ||
-d text="$message" \ | ||
-d parse_mode="Markdown" | ||
} | ||
send_telegram_message "Crave ProjectID: $PROJECTID %0ABuild for ${{ github.event.inputs.DEVICE_NAME }} has status: $jobStatus %0ACheck Progress at: %0Ahttps://github.com/$(echo "${{ github.repository }}" | sed 's@_@\\_@g')/actions/runs/${{ github.run_id }}" | ||
# Todo: error.log link | ||
env: | ||
chatId: ${{ secrets.TELEGRAM_TO }} | ||
botToken: ${{ secrets.TELEGRAM_TOKEN }} | ||
jobStatus: ${{ job.status }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters