File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,27 @@ runs:
182
182
# when update is successful #
183
183
# ------------------------- #
184
184
- name : Open PR if the updated lean build was successful
185
- if : steps.build-lean.outcome == 'success' && inputs.on_update_succeeds == 'pr' && steps.check-update.outputs.do_update == 'true'
185
+ if : steps.build-lean.outcome == 'success' &&
186
+ inputs.on_update_succeeds == 'pr' &&
187
+ steps.check-update.outputs.do_update == 'true' &&
188
+ steps.check-update.outputs.lean_toolchain_updated == 'true'
189
+ uses : peter-evans/create-pull-request@v7
190
+ with :
191
+ title : " Updates available and ready to merge"
192
+ body : |
193
+ The `lean-toolchain` file has been updated to the following version:
194
+ ```
195
+ ${{ steps.record-latest-lean.outputs.latest_lean }}
196
+ ```
197
+ delete-branch : true
198
+ branch : auto-update-lean/patch
199
+ labels : " auto-update-lean"
200
+
201
+ - name : Open PR if the updated lean build was successful
202
+ if : steps.build-lean.outcome == 'success' &&
203
+ inputs.on_update_succeeds == 'pr' &&
204
+ steps.check-update.outputs.do_update == 'true' &&
205
+ steps.check-update.outputs.lean_toolchain_updated == 'false'
186
206
uses : peter-evans/create-pull-request@v7
187
207
with :
188
208
title : " Updates available and ready to merge"
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ if (updateIfModified === 'lean-toolchain') {
46
46
const result = {
47
47
files_changed : changedFiles . length > 0 ,
48
48
do_update : doUpdate ,
49
- changed_files : changedFiles . join ( ' ' )
49
+ changed_files : changedFiles . join ( ' ' ) ,
50
+ lean_toolchain_updated : fileChanges [ 'lean-toolchain' ]
50
51
} ;
51
52
52
53
console . log ( 'info:' , JSON . stringify ( result , null , 2 ) ) ;
@@ -57,4 +58,5 @@ if (githubOutput) {
57
58
fs . appendFileSync ( githubOutput , `files_changed=${ result . files_changed } \n` ) ;
58
59
fs . appendFileSync ( githubOutput , `changed_files=${ result . changed_files } \n` ) ;
59
60
fs . appendFileSync ( githubOutput , `do_update=${ result . do_update } \n` ) ;
61
+ fs . appendFileSync ( githubOutput , `lean_toolchain_updated=${ result . lean_toolchain_updated } \n` ) ;
60
62
}
You can’t perform that action at this time.
0 commit comments