https://github.com/louis70109/line-bot-gitbub-actions-receiver
GitHub Actions rerun job using LINE Bot
https://github.com/louis70109/line-bot-gitbub-actions-receiver
Last synced: about 2 months ago
JSON representation
GitHub Actions rerun job using LINE Bot
- Host: GitHub
- URL: https://github.com/louis70109/line-bot-gitbub-actions-receiver
- Owner: louis70109
- License: mit
- Created: 2022-07-26T16:15:22.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-18T10:03:26.000Z (10 months ago)
- Last Synced: 2025-03-11T11:38:36.772Z (3 months ago)
- Language: Python
- Size: 660 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: change_bot_url.sh
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Receiver with GitHub Actions and Notes

1. When CI fail, will push a fail Flex message notification to ADMIN LINE account.
- Let status readable and deploy again with ADMIN. So Receiver will parse the request and re-run GitHub actions.
2. If you have some ideas at a moment. You can type it into LINE Bot, will commit to another repo to record it. ([reference](https://github.com/louis70109/ideas-tree/tree/master))
3. Find Nijia's side project entrance. Input `入口` on LINE bot.> [GitHub Actions Sample](https://github.com/louis70109/nijia-blog-backup/blob/master/.github/workflows/deploy.yml)

# Deployment
## Heroku
[](https://heroku.com/deploy)
## Google Cloud Run
[](https://deploy.cloud.run)
# Developer Side
## LINE account
- Got a LINE Bot API developer account
Make sure you already registered, if you need use LINE Bot.- Go to LINE Developer Console
- Close auto-reply setting on "Messaging API" Tab.
- Setup your basic account information. Here is some info you will need to know.
- Callback URL: `https://{NGROK_URL}/webhooks/line`
- Verify your webhook.
- You will get following info, need fill back to `.env` file.
- Channel Secret
- Channel Access Token (You need to issue one here)## Normal testing
1. first terminal window
```
cp .env.sample .env
pip install -r requirements.txt --user
python api.py
```2. Create a provisional https:
```
ngrok http 5000
```or maybe you have npm environment:
```
npx ngrok http 5000
```
3. Use `change.bot_url.sh` to change your webhook url.
```
sh change_bot_url.sh YOUR_LINE_BOT_ACCESS_TOKEN https://DOMAIN_URL/webhooks/line
```Then will see below message:
```
--------------------------{}
--------------------------
{"endpoint":"https://DOMAIN_URL/webhooks/line","active":true}
-------------------------{"success":true,"timestamp":"2022-09-17T12:18:58.936898Z","statusCode":200,"reason":"OK","detail":"200"}%
```# License
MIT License