name: Update Gradle Wrapper

on:
  schedule:
    - cron: "0 0 * * *"

jobs:
  update-gradle-wrapper:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Update Gradle Wrapper
        uses: gradle-update/update-gradle-wrapper-action@v1
        # Skip in forks
        if: github.repository == 'vector-im/element-x-android'
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          target-branch: develop
