name: Gradle update
on:
  workflow_dispatch:
  schedule:
    - cron: '3 6 * * *'
permissions:
  actions: none
  checks: none
  contents: write
  deployments: none
  discussions: none
  id-token: none
  issues: none
  packages: none
  pages: none
  pull-requests: write
  repository-projects: none
  security-events: none
  statuses: none
jobs:
  gradle-update:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4.2.2
    - uses: obfusk/gradle-update-action@v3.0.0
      id: gradle-update
    - uses: gradle/actions/wrapper-validation@v4
    - name: Create Pull Request
      uses: peter-evans/create-pull-request@v7.0.5
      with:
        title: "Update Gradle to ${{ steps.gradle-update.outputs.version }}"
        commit-message: "Update Gradle to ${{ steps.gradle-update.outputs.version }}"
        branch-suffix: timestamp
