Bump peter-evans/create-pull-request from 6 to 7
[yosql.git] / .github / workflows / update-parent.yml
blobf539ba4815feb740c14107071eae6bfff640f623
1 name: Update Parent
2 on:
3   schedule:
4     - cron: 0 1 3 * *
5 env:
6   JAVA_VERSION: 17
7   JAVA_PACKAGE: jdk
8   JAVA_ARCH: x64
9   JAVA_DISTRO: temurin
10 jobs:
11   build:
12     runs-on: ubuntu-latest
13     steps:
14       - uses: actions/checkout@v4
15       - name: Set up Java
16         uses: actions/setup-java@v4
17         with:
18           java-version: ${{ env.JAVA_VERSION }}
19           java-package: ${{ env.JAVA_PACKAGE }}
20           architecture: ${{ env.JAVA_ARCH }}
21           distribution: ${{ env.JAVA_DISTRO }}
22           cache: maven
23       - name: Update parent
24         run: mvn --batch-mode --define generateBackupPoms=false versions:update-parent
25       - id: cpr
26         name: Create Pull Request
27         uses: peter-evans/create-pull-request@v7
28         with:
29           token: ${{ secrets.PAT }}
30           commit-message: Update parent to latest version
31           committer: GitHub <noreply@github.com>
32           author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
33           title: Update parent to latest version
34           body: |
35             `mvn --batch-mode versions:update-parent -DgenerateBackupPoms=false`
36           labels: |
37             Build :: Maven
38             Priority :: Low
39             Type :: Task
40           assignees: sebhoss
41           draft: false
42           base: main
43           branch: update-parent
44           delete-branch: true
45       - name: Enable Pull Request Automerge
46         if: steps.cpr.outputs.pull-request-operation == 'created'
47         run: gh pr merge --rebase --auto "${{ steps.cpr.outputs.pull-request-number }}"
48         with:
49           token: ${{ secrets.PAT }}