-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
963f767
commit cc6eaf4
Showing
3 changed files
with
158 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Get Prediction | ||
|
||
on: | ||
schedule: | ||
- cron: "03 16 * * *" | ||
|
||
jobs: | ||
send-message: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Send message to LINE | ||
env: | ||
LINE_ACCESS_TOKEN: ${{ secrets.LINE_CHANNEL_ACCESS_TOKEN }} | ||
LINE_USER_ID: ${{ secrets.LINE_USER_ID }} | ||
run: | | ||
curl -X POST https://api.line.me/v2/bot/message/push \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $LINE_ACCESS_TOKEN" \ | ||
-d '{ | ||
"to": "'$LINE_USER_ID'", | ||
"messages":[ | ||
{ | ||
"type":"text", | ||
"text":"喚醒 Line 機器人" | ||
} | ||
] | ||
}' | ||
sleep 300 | ||
curl -X POST https://api.line.me/v2/bot/message/push \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $LINE_ACCESS_TOKEN" \ | ||
-d '{ | ||
"to": "'$LINE_USER_ID'", | ||
"messages":[ | ||
{ | ||
"type":"text", | ||
"text":"NBA thismonth 30" | ||
}, | ||
{ | ||
"type":"text", | ||
"text":"NBA lastmonth 30" | ||
} | ||
] | ||
}' | ||
sleep 60 | ||
curl -X POST https://api.line.me/v2/bot/message/push \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $LINE_ACCESS_TOKEN" \ | ||
-d '{ | ||
"to": "'$LINE_USER_ID'", | ||
"messages":[ | ||
{ | ||
"type":"text", | ||
"text":"NHL冰球 thismonth 30" | ||
}, | ||
{ | ||
"type":"text", | ||
"text":"NHL冰球 lastmonth 30" | ||
} | ||
] | ||
}' | ||
sleep 60 | ||
curl -X POST https://api.line.me/v2/bot/message/push \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $LINE_ACCESS_TOKEN" \ | ||
-d '{ | ||
"to": "'$LINE_USER_ID'", | ||
"messages":[ | ||
{ | ||
"type":"text", | ||
"text":"MLB thismonth 30" | ||
}, | ||
{ | ||
"type":"text", | ||
"text":"MLB lastmonth 30" | ||
} | ||
] | ||
}' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Get Result | ||
|
||
on: | ||
schedule: | ||
- cron: "46 13 * * *" | ||
|
||
jobs: | ||
send-message: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Send message to LINE | ||
env: | ||
LINE_ACCESS_TOKEN: ${{ secrets.LINE_CHANNEL_ACCESS_TOKEN }} | ||
LINE_USER_ID: ${{ secrets.LINE_USER_ID }} | ||
run: | | ||
curl -X POST https://api.line.me/v2/bot/message/push \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $LINE_ACCESS_TOKEN" \ | ||
-d '{ | ||
"to": "'$LINE_USER_ID'", | ||
"messages":[ | ||
{ | ||
"type":"text", | ||
"text":"喚醒 Line 機器人" | ||
} | ||
] | ||
}' | ||
sleep 300 | ||
curl -X POST https://api.line.me/v2/bot/message/push \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $LINE_ACCESS_TOKEN" \ | ||
-d '{ | ||
"to": "'$LINE_USER_ID'", | ||
"messages":[ | ||
{ | ||
"type":"text", | ||
"text":"NBA yesterday 20" | ||
} | ||
] | ||
}' | ||
sleep 60 | ||
curl -X POST https://api.line.me/v2/bot/message/push \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $LINE_ACCESS_TOKEN" \ | ||
-d '{ | ||
"to": "'$LINE_USER_ID'", | ||
"messages":[ | ||
{ | ||
"type":"text", | ||
"text":"NHL冰球 yesterday 20" | ||
} | ||
] | ||
}' | ||
sleep 60 | ||
curl -X POST https://api.line.me/v2/bot/message/push \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $LINE_ACCESS_TOKEN" \ | ||
-d '{ | ||
"to": "'$LINE_USER_ID'", | ||
"messages":[ | ||
{ | ||
"type":"text", | ||
"text":"MLB yesterday 20" | ||
} | ||
] | ||
}' |
This file was deleted.
Oops, something went wrong.