33 lines
737 B
YAML
33 lines
737 B
YAML
name: Daily check in
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 22 * * *" # scheduled at 06:00 (UTC+8) everyday
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check-in:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Clone Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- name: Check In
|
|
run: node index.js
|
|
env:
|
|
CRED: ${{ secrets.CRED }}
|
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
|
DISCORD_USER: ${{ secrets.DISCORD_USER }}
|
|
workflow-keepalive:
|
|
if: github.event_name == 'schedule'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
actions: write
|
|
steps:
|
|
- uses: liskin/gh-workflow-keepalive@v1
|