19
19
PR_MESSAGE : |
20
20
Automation to keep dependencies in `Cargo.lock` current.
21
21
22
- In addition to the semver-compatible updates in this PR,
23
- the following major upgrades are also available:
22
+ The following is the output from `cargo update`:
24
23
25
24
jobs :
26
25
update :
@@ -36,28 +35,23 @@ jobs:
36
35
# Extract the stage0 version
37
36
TOOLCHAIN=$(jq -r '.compiler | {version,date} | join("-")' -- src/stage0.json)
38
37
# Install and set as default
39
- rustup toolchain install $TOOLCHAIN
38
+ rustup toolchain install --no-self-update --profile minimal $TOOLCHAIN
40
39
rustup default $TOOLCHAIN
41
- - name : install cargo-upgrades
42
- run : cargo install -f cargo-upgrades $CARGO_UPGRADES_VER
43
40
44
41
- name : cargo update
45
- run : cargo update
42
+ # `cargo update` outputs to stderr
43
+ run : cargo update 2>&1 > cargo_update.log
46
44
- name : upload Cargo.lock artifact for use in PR
47
45
uses : actions/upload-artifact@v3
48
46
with :
49
47
name : Cargo-lock
50
48
path : Cargo.lock
51
49
retention-days : 1
52
-
53
- - name : cargo upgrades
54
- # cargo-upgrade exits 7 if upgrades are available, ignore that
55
- run : cargo upgrades > cargo_upgrades.stdout || exit 0
56
- - name : upload upgrades artifact for use in PR
50
+ - name : upload cargo-update log artifact for use in PR
57
51
uses : actions/upload-artifact@v3
58
52
with :
59
- name : cargo-upgrades
60
- path : cargo_upgrades.stdout
53
+ name : cargo-updates
54
+ path : cargo_update.log
61
55
retention-days : 1
62
56
63
57
pr :
@@ -75,16 +69,16 @@ jobs:
75
69
uses : actions/download-artifact@v3
76
70
with :
77
71
name : Cargo-lock
78
- - name : download cargo-upgrades from update job
72
+ - name : download cargo-update log from update job
79
73
uses : actions/download-artifact@v3
80
74
with :
81
- name : cargo-upgrades
75
+ name : cargo-updates
82
76
83
77
- name : craft PR body
84
78
run : |
85
79
echo "${PR_MESSAGE}" > body.md
86
80
echo '```txt' >> body.md
87
- cat cargo_upgrades.stdout >> body.md
81
+ cat cargo_update.log >> body.md
88
82
echo '```' >> body.md
89
83
90
84
- name : commit
0 commit comments