Skip to content

testing the ci telegram bot #12

testing the ci telegram bot

testing the ci telegram bot #12

name: telegram message
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Select random photo
id: random_photo
run: |
PHOTO=$(ls tests/*.* | shuf -n 1)
echo "::set-output name=photo::$PHOTO"
shell: bash
- name: send telegram message on push
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.BOTTOKEN }}
message: |
🚀 *New Commit Made!*
_Author_: ${{ github.actor }}
_Commit Message_: ${{ github.event.commits[0].message }}
_Repository_: ${{ github.repository }}
[See changes here](https://github.com/${{ github.repository }}/commit/${{github.sha}})
photo: ${{ steps.random_photo.outputs.photo }}