Skip to content

zdm_crawler

zdm_crawler #31980

Workflow file for this run

name: zdm_crawler
on:
#将下面两行代码取消注释
schedule:
- cron: "0/20 * * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: |
mvn package
cp ./target/zdm-0.0.1.jar ./zdm.jar
- name: main logic
env:
# 点值的数量>minVoted,才会被推送,填0为都推送
minVoted: 10
# 评论的数量>minComments,才会被推送,填0为都推送
minComments: 3
# 优惠信息数量>MIN_PUSH_SIZE就会发邮件,否则积累到下一次触发任务再决定是否推送. 不建议填太小的数字,避免邮件太多了
MIN_PUSH_SIZE: 30
# 邮箱的smtp服务器地址
emailHost: smtp.126.com
# 接收优惠信息的邮箱
emailAccount: ${{secrets.emailAccount}}
# 接收优惠信息的邮箱的授权码
emailPassword: ${{secrets.emailPassword}}
run: java -jar zdm.jar
- name: git add files
run: |
git add unpushed.txt
git add ./logs/
- name: commit & push
uses: actions-go/push@master
with:
author-email: '[email protected]'
author-name: 'Coupon'
commit-message: 'update articles'
token: ${{ secrets.GIT_TOKEN }}