Skip to content

Create static.yml

Create static.yml #36

Workflow file for this run

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 17
uses: actions/setup-java@v1
with:
java-version: 17
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Run Java Application
run: java -jar target/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/mobaijun/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