zh push #2546
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: zh push | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# 分别在北京时间早8、12、下午4时拉取热点信息 | |
- cron: '0 23 * * *' | |
- cron: '0 5 * * *' | |
- cron: '0 8 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Run Java Application | |
run: java -jar target/april-zh-hotspot-push-1.0.0.jar | |
- name: Commit files | |
run: | | |
git config --local user.email "mobaijun8@163.com" | |
git config --local user.name "mobaijun" | |
git pull | |
git add ThieuHotList.md | |
git commit -m ":sparkles: update current hotspot" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GIT_TOKEN }} | |
branch: main |