-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (37 loc) · 1.07 KB
/
java-action.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
name: Java Action
on:
schedule:
- cron: '0 12 1 * *'
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Run Java Application
run: java -jar target/april-github-star-list-jar-with-dependencies.jar
- name: Commit generated repo.md file
run: |
git config --local user.email "[email protected]"
git config --local user.name "mobaijun"
git pull
git add .
git commit -m ":sparkles: Add generated repo.md file"
git remote set-url origin https://github.com/april-projects/april-github-star-list.git
git push origin main
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GIT_TOKEN }}
branch: main