update-java #244
This file contains hidden or 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
| # SPDX-FileCopyrightText: Copyright © 2024 - 2025 Caleb Cushing | |
| # | |
| # SPDX-License-Identifier: CC0-1.0 | |
| name: update-java | |
| on: | |
| schedule: | |
| - cron: "0 3 * * *" | |
| push: | |
| branches: | |
| - ci/auto-update-java | |
| - ci/auto-update | |
| jobs: | |
| update-java: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| packages: read | |
| env: | |
| ORG_GRADLE_PROJECT_ghUsername: ${{ secrets.GITHUB_ACTOR }} | |
| ORG_GRADLE_PROJECT_ghPassword: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| with: | |
| ref: ${{ github.ref }} | |
| filter: "blob:none" | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v4.7.1 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - uses: gradle/actions/setup-gradle@v4.4.1 | |
| with: | |
| gradle-version: current | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - run: gradle wrapper --write-locks | |
| - run: make ci-update-java | |
| - run: | | |
| echo "stdout<<EOF" >> $GITHUB_OUTPUT | |
| git status --porcelain=1 | tee --append $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| name: git status | |
| id: git_status | |
| - uses: actions/setup-python@v5.6.0 | |
| with: | |
| python-version: "3" | |
| if: ${{ contains(steps.git_status.outputs.stdout, 'gradle/wrapper/') }} | |
| - run: pip install -r requirements.txt | |
| if: ${{ contains(steps.git_status.outputs.stdout, 'gradle/wrapper/') }} | |
| - run: | | |
| reuse annotate --license 'Apache-2.0' --copyright 'Gradle, Inc' \ | |
| --copyright-prefix spdx-string-symbol --merge-copyrights --force-dot-license gradle/wrapper/gradle-wrapper.jar | |
| reuse annotate --license 'CC0-1.0' --copyright 'Caleb Cushing' \ | |
| --copyright-prefix spdx-string-symbol --merge-copyrights --force-dot-license gradle/wrapper/gradle-wrapper.properties | |
| name: reuse | |
| if: ${{ contains(steps.git_status.outputs.stdout, 'gradle-wrapper.jar') }} | |
| - uses: peter-evans/create-pull-request@v7.0.8 | |
| id: create_pr | |
| with: | |
| title: "chore(deps): java" | |
| branch: deps/update-java | |
| token: ${{ secrets.GH_MERGE_PAT }} | |
| - run: gh pr merge --auto --squash ${{ steps.create_pr.outputs.pull-request-number }} | |
| if: ${{ steps.create_pr.outputs.pull-request-number != '' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_MERGE_PAT }} |