Skip to content

Commit 3997268

Browse files
committed
include updates in commit message
1 parent eb357d3 commit 3997268

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/dependencies.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ env:
2020
Automation to keep dependencies in `Cargo.lock` current.
2121
2222
The following is the output from `cargo update`:
23+
COMMIT_MESSAGE: "cargo update \n\n"
2324

2425
jobs:
2526
update:
@@ -39,7 +40,8 @@ jobs:
3940
rustup default $TOOLCHAIN
4041
4142
- name: cargo update
42-
run: cargo update 2>&1 | tee -a cargo_update.log
43+
# Remove first line that always just says "Updating crates.io index"
44+
run: cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
4345
- name: upload Cargo.lock artifact for use in PR
4446
uses: actions/upload-artifact@v3
4547
with:
@@ -73,8 +75,11 @@ jobs:
7375
with:
7476
name: cargo-updates
7577

76-
- name: craft PR body
78+
- name: craft PR body and commit message
7779
run: |
80+
echo "${COMMIT_MESSAGE}" > commit.txt
81+
cat cargo_update.log >> commit.txt
82+
7883
echo "${PR_MESSAGE}" > body.md
7984
echo '```txt' >> body.md
8085
cat cargo_update.log >> body.md
@@ -86,7 +91,7 @@ jobs:
8691
git config user.email [email protected]
8792
git switch -C cargo_update
8893
git add ./Cargo.lock
89-
git commit --no-verify -m "cargo update"
94+
git commit --no-verify --file=commit.txt
9095
9196
- name: edit and reopen existing pull request
9297
id: edit

0 commit comments

Comments
 (0)