Try action with tg bot
- Current Repository Setting -> Secrets -> Add a new secret
- Add bot token Name BOT1_TOKEN
- Add test chat id Name CHAT_ID
- In yml file
- This will set OS env variable
- env:
- TOKEN: ${{ secrets.BOT1_TOKEN}}
- ID: ${{ secrets.CHAT_ID }}
- In source code
- Get env variable from OS
- myid = os.getenv("ID")
- bot_token = os.getenv("TOKEN")
- Send . Required arguments
- chat_id
- media, list to json object
- type: photo
- media: url
- Max count in album is 10 photos.
- Get photo from webAPI and send with telegram bot to target ID
- Schedule is every hour on hour.
- Required data
- bot token
- target id
- web url
- web api
- Get photo from webAPI and send to target group with bot
- Schedul runs on every 30th minute
- Required secrets
- bot token
- group id - alias BLBCPID
- photoAPI - alias BLBCPAPI