Update Java #92
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
name: Update Java | |
on: | |
schedule: | |
# ┌───────────── minute (0 - 59) | |
# │ ┌───────────── hour (0 - 23) | |
# │ │ ┌───────────── day of the month (1 - 31) | |
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | |
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | |
# * * * * * | |
- cron: "0 3 * * *" # 3am every Wednesday | |
push: | |
branches: | |
- fix/auto-update | |
jobs: | |
update-java: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 11 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-version: current | |
arguments: wrapper --write-locks | |
- run: ./gradlew --version | |
- run: find . -name '*gradle.lockfile' -delete | |
- run: ./gradlew wrapper --write-locks | |
- run: ./gradlew wrapper # somehow the final bat was not generated before | |
- run: ./gradlew build shadowJar buildHealth --write-locks --scan | |
- uses: peter-evans/create-pull-request@v6 | |
with: | |
title: "chore(deps): java" | |
branch: topic/update-java | |
token: ${{ secrets.GH_MERGE_PAT }} | |
- run: gh pr merge --auto --squash ${{ env.PULL_REQUEST_NUMBER }} | |
if: ${{ env.PULL_REQUEST_NUMBER != '' }} | |
env: | |
GH_TOKEN: ${{ secrets.GH_MERGE_PAT }} |