Bump dawidd6/action-send-mail from 3 to 4
[yosql.git] / .github / workflows / update-gradle-wrapper.yml
blobd40a50b0be39fe0b56eb29c10eac2e05f1662cec
1 name: Update Gradle Wrapper
2 on:
3   schedule:
4     - cron: 0 3 3 * *
5 env:
6   JAVA_VERSION: 17
7   JAVA_PACKAGE: jdk
8   JAVA_ARCH: x64
9   JAVA_DISTRO: temurin
10 jobs:
11   update-gradle-wrapper:
12     runs-on: ubuntu-latest
13     steps:
14       - id: checkout
15         name: Clone Git Repository
16         uses: actions/checkout@v4
17       - id: java
18         name: Setup Java
19         uses: actions/setup-java@v4
20         with:
21           java-version: ${{ env.JAVA_VERSION }}
22           java-package: ${{ env.JAVA_PACKAGE }}
23           architecture: ${{ env.JAVA_ARCH }}
24           distribution: ${{ env.JAVA_DISTRO }}
25           cache: maven
26       - id: maven
27         name: Maven Tooling
28         run: mvn --batch-mode install --define skipTests
29       - id: gwu
30         name: yosql-tooling-gradle
31         uses: EdwarDDay/upgrade-gradle-action@v1
32         with:
33           working-directory: yosql-tooling/yosql-tooling-gradle
34           distribution-type: all
35       - name: yosql-examples-gradle
36         uses: EdwarDDay/upgrade-gradle-action@v1
37         with:
38           working-directory: yosql-examples/yosql-examples-gradle
39           distribution-type: all
40       - name: Validate Gradle Wrapper
41         uses: gradle/wrapper-validation-action@v3
42       - id: cpr
43         name: Create Pull Request
44         uses: peter-evans/create-pull-request@v7
45         with:
46           token: ${{ secrets.PAT }}
47           commit-message: Update gradle-wrapper to latest version
48           committer: GitHub <noreply@github.com>
49           author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
50           title: Update gradle-wrapper to latest version
51           body: ${{ steps.gwu.outputs.version-information }}
52           labels: |
53             Build :: Gradle
54             Priority :: Low
55             Type :: Task
56           assignees: sebhoss
57           draft: false
58           base: main
59           branch: update-gradle-wrapper
60           delete-branch: true
61       - name: Enable Pull Request Automerge
62         if: steps.cpr.outputs.pull-request-operation == 'created'
63         run: gh pr merge --rebase --auto "${{ steps.cpr.outputs.pull-request-number }}"
64         with:
65           token: ${{ secrets.PAT }}