Skip to content

Commit 4fdd9f5

Browse files
committed
[skip ci] let the create-pull-request workflow commit
1 parent d5188c5 commit 4fdd9f5

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

.github/workflows/update_submodules.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Update Submodules
22

3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
37
on:
48
schedule:
59
- cron: '0 0 * * *' # runs every day at midnight UTC
@@ -54,22 +58,14 @@ jobs:
5458
if: env.changed == 'true'
5559
run: dotnet build
5660

57-
- name: Commit and push changes
58-
if: env.changed == 'true'
59-
shell: bash
60-
run: |
61-
BRANCH_NAME="update-submodules-$(date +%Y%m%d%H%M%S)"
62-
git checkout -b $BRANCH_NAME
63-
git commit -m "Update submodules"
64-
git push origin $BRANCH_NAME
65-
echo "branch_name=$BRANCH_NAME" >> $GITHUB_ENV
66-
6761
- name: Create Pull Request
6862
if: env.changed == 'true'
69-
uses: peter-evans/create-pull-request@v6
63+
uses: peter-evans/create-pull-request@v7
7064
with:
7165
token: ${{ secrets.GITHUB_TOKEN }}
72-
branch: ${{ env.branch_name }}
66+
commit-message: Update submodules
67+
branch: "update-submodules"
68+
delete-branch: true
7369
title: "Update Git submodules"
7470
body: |
7571
This PR updates the Git submodules to their latest commits.

0 commit comments

Comments
 (0)