-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.71 KB
/
auto-order.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: order-daily
on:
repository_dispatch:
types: [cloud_trigger]
workflow_dispatch:
schedule:
# 定时任务,在每天的19点30执行任务
- cron: '30 11 * * *'
jobs:
start:
runs-on: ubuntu-latest
steps:
- name: 设置时区
run: sudo timedatectl set-timezone 'Asia/Shanghai'
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: 设置缓存
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: 执行点餐
env:
MEI_CAN_USERNAME: ${{ secrets.USER_NAME }}
MEI_CAN_PASSWORD: ${{ secrets.PASSWORD }}
TENCENT_SMS_APP_ID: ${{ secrets.APP_ID }}
TENCETN_SECRET_ID: ${{ secrets.SECRET_ID }}
TENCENT_SECRET_KEY: ${{ secrets.SECRET_KEY }}
TENCENT_SMS_MESSAGE_TEMPLATE_ID: ${{ secrets.MESSAGE_TEMPLATE_ID }}
TENCENT_SMS_SIGN: ${{ secrets.SIGN }}
MEI_CAN_NOTIFY_PHONE: ${{ secrets.PHONE }}
FEI_SHU_NOTIFY_WEBHOOK: ${{ secrets.FEI_SHU_NOTIFY_WEBHOOK }}
run: mvn install -Dmaven.test.skip=true exec:java -Dexec.mainClass="cn.satc.order.AutoOrderApplication" -Dexec:classpathScope=runtime -Dmeican.member.username=$MEI_CAN_USERNAME -Dmeican.member.password=$MEI_CAN_PASSWORD -Dmeican.member.notify-phone=$MEI_CAN_NOTIFY_PHONE -Dtencent.sms.app-id=$TENCENT_SMS_APP_ID -Dtencent.sms.secret-id=$TENCETN_SECRET_ID -Dtencent.sms.secret-key=$TENCENT_SECRET_KEY -Dtencent.sms.template-id=$TENCENT_SMS_MESSAGE_TEMPLATE_ID -Dtencent.sms.sign=$TENCENT_SMS_SIGN -Dfeishu.notify.webhook=$FEI_SHU_NOTIFY_WEBHOOK