Bump peter-evans/create-pull-request from 5 to 6
[yosql.git] / .github / workflows / update-gradle-wrapper.yml
blobe3e5ba785d9b10db257ac9a172f5f811db39f794
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@v2
42       - id: cpr
43         name: Create Pull Request
44         uses: peter-evans/create-pull-request@v6
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 }}