forked from merrycodes/Office-E5
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.55 KB
/
main.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Office E5
on:
schedule:
- cron: '0 0/6 15 1/2 ?'
release:
types: [published]
watch:
types: [started]
jobs:
Call-APi:
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id || github.event_name == 'schedule' # 自己star启动或者schedule触发
steps:
- name: Setup timezone
uses: zcong1993/[email protected]
with:
timezone: Asia/Shanghai
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Run jar
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
TENANT_GUID: ${{ secrets.TENANT_GUID }}
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
run: |
java -jar ./officeE5-1.0-SNAPSHOT-jar-with-dependencies.jar "$CLIENT_ID" "$USERNAME" "$PASSWORD" "$TENANT_GUID" "$CLIENT_SECRET" >> ./run.log
tail run.log
- name: Commit log
env:
NAME: Charle
EMAIL: [email protected]
run: |
git config --global user.name "$NAME"
git config --global user.email "$EMAIL"
git add .
git commit -m "update log" -a
- name: Push log
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.TOKEN }}
branch: main