Skip to content

Gradle

Gradle #496

Workflow file for this run

name: Gradle
on:
workflow_dispatch:
schedule:
- cron: "30 5 * * MON-FRI" # Every weekday at 05:30 UTC
push:
paths:
- gradlew
- gradlew.bat
- gradle/**
- .github/workflows/gradle.yml
jobs:
validate-wrapper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
update-wrapper:
runs-on: ubuntu-latest
if: github.ref_name == 'main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup GPG commit verification
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
with:
gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.BOT_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- uses: gradle-update/update-gradle-wrapper-action@0407394b9d173dfc9cf5695f9f560fef6d61a5fe # v1
with:
labels: dependencies
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Reset commit author # workaround for https://github.com/gradle-update/update-gradle-wrapper-action/issues/124
continue-on-error: true
run: |
if [ "$(git branch --show-current)" != main ]; then
git config --local user.name probation-integration-bot
git config --local user.email [email protected]
git rebase --exec 'git commit --amend --reset-author --no-edit' "HEAD~$(find . -type f -name gradlew | wc -l)"
git push --set-upstream origin "$(git branch --show-current)" --force
fi