Commit bbf76995 authored by Nairong Xie's avatar Nairong Xie
Browse files

Add Telegram Message

parent 21457a6b
......@@ -27,17 +27,28 @@ jobs:
python -m pip install -r requirements.txt
- name: Run Script (scheduled)
id: run_scheduled
if: ${{ github.event_name == 'schedule' }}
run: |
echo -ne "::set-output name=message::"
python checkin.py
env:
NJU_USER: ${{ secrets.NJU_USER }}
NJU_PASS: ${{ secrets.NJU_PASS }}
- name: Run Script (manually)
id: run_manually
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo -ne "::set-output name=message::"
python checkin.py
env:
NJU_USER: ${{ github.event.inputs.user }}
NJU_PASS: ${{ github.event.inputs.pass }}
- name: Send Telegram Message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
args: ${{ join(steps.run_scheduled.outputs.*, '\n') }}${{ join(steps.run_manually.outputs.*, '\n') }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment