Open adamw7 opened 1 year ago
Maybe this can be useful:
name: Update Maven Dependencies
on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
- name: Update Dependencies
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
mvn versions:use-latest-releases -DgenerateBackupPoms=false -Dmaven.test.skip=true
git diff
git add .
git commit -m "chore: Update Maven dependencies to latest releases [skip ci]"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
mvn versions:use-latest-releases mvn clean install if (successful) push else fail