Commit 9bdac0b873d7042df0dab920d1752022aeaadd1b notification (@Sheridan) #26
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: Notify on Commit | |
| run-name: Commit ${{ github.sha }} notification (@${{ github.actor }}) | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| jobs: | |
| notify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Send commit information to Telegram | |
| run: | | |
| COMMIT_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}" | |
| MESSAGE="🔖 New [commit](${COMMIT_URL}) pushed to branch \`${GITHUB_REF_NAME}\` by ${GITHUB_ACTOR} with message: \`${{ github.event.head_commit.message }}\`" | |
| curl -s -X POST \ | |
| "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" \ | |
| -d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \ | |
| -d parse_mode="Markdown" \ | |
| --data-urlencode text="$MESSAGE" |