Skip to content

zhr-action Demo

zhr-action Demo #759

Workflow file for this run

name: 'zhr-action Demo'
on:
workflow_dispatch:
schedule:
# `0 23 * * *` 表示UTC 23:00,即北京时间7:00打卡(经测试,实际运行时间比设定时间晚几分钟到几十分钟)。
# 可以参考 https://crontab.guru/ 进行配置
- cron: '0 23 * * *'
jobs:
main:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- username: ZJU_USERNAME
password: ZJU_PASSWORD
# 如果出现登录异常,可以配置 ZJU_COOKIE secret,请参考 https://github.com/upupming/zhr-action#%E7%99%BB%E5%BD%95%E5%BC%82%E5%B8%B8 获取 ZJU_COOKIE 的值
cookie_eai_sess: ZJU_COOKIE
dingtalk_token: DINGTALK_TOKEN
steps:
- name: 打卡
uses: upupming/zhr-action@release
with:
username: ${{ secrets[matrix.username] }}
password: ${{ secrets[matrix.password] }}
cookie_eai_sess: ${{ secrets[matrix.cookie_eai_sess] }}
dingtalk_token: ${{ secrets[matrix.dingtalk_token] }}
env:
ACTION_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}