Office E5 #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |