devices: Add ingres #232
This file contains hidden or 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
| name: Pull Request Notifier | |
| on: | |
| pull_request_target: | |
| types: | |
| - opened | |
| jobs: | |
| pull_req: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Get Info | |
| run: | | |
| sudo apt-get install jq -y &> /dev/null | |
| PR_TITLE=$(jq --raw-output .pull_request.title ${GITHUB_EVENT_PATH}) | |
| PR_TITLE_ESCAPED=$(echo "$PR_TITLE" | sed 's/[&/\_*]/\\&/g') | |
| PR_URL=$(jq --raw-output .pull_request.html_url ${GITHUB_EVENT_PATH}) | |
| echo "PR_TITLE=${PR_TITLE_ESCAPED}" >> ${GITHUB_ENV} | |
| echo "PR_URL=${PR_URL}" >> ${GITHUB_ENV} | |
| - name: Notify in Telegram | |
| run: | | |
| TgNotify() { | |
| curl -s -X POST "https://api.telegram.org/bot${{ secrets.BOT_TOKEN }}/sendMessage" \ | |
| -d chat_id="${{ secrets.PRIV_CHAT_ID }}" \ | |
| -d message_thread_id="${{ secrets.TOPIC_ID }}" \ | |
| -d parse_mode=Markdown \ | |
| -d text="${1}" \ | |
| -d disable_web_page_preview=true | |
| } | |
| TgNotify " | |
| #PULL\_REQ | |
| *New Pull Request Opened at* [${{ github.repository }}](https://github.com/${{ github.repository }}) | |
| *Title:* \`${PR_TITLE}\` | |
| *User:* [${{ github.actor }}](https://github.com/${{ github.actor }}) | |
| *Pull Req URL:* [Here](${PR_URL})" |