@@ -132,15 +132,35 @@ jobs:
132
132
echo "MERGE_CONFLICTS=maybe" >> $GITHUB_ENV
133
133
fi
134
134
135
+ - name : Create Pull Request to update subtree/library
136
+ if : ${{ env.MERGE_CONFLICTS != 'noop' && env.SUBTREE_PR_EXISTS == 'no' }}
137
+ uses : peter-evans/create-pull-request@v7
138
+ with :
139
+ title : ' Update subtree/library to ${{ env.NEXT_TOOLCHAIN_DATE }}'
140
+ body : >
141
+ This is an automated PR to update the subtree/library branch to the changes
142
+ from ${{ env.CURRENT_TOOLCHAIN_DATE }} (rust-lang/rust@${{ env.CURRENT_COMMIT_HASH }})
143
+ to ${{ env.NEXT_TOOLCHAIN_DATE }} (rust-lang/rust@${{ env.NEXT_COMMIT_HASH }}), inclusive.
144
+
145
+ **Review this PR as usual, but do not merge this PR using the GitHub web interface.
146
+ Instead, once it is approved, use `git push` to literally push the changes to `subtree/library`
147
+ without any rebase or merge.**
148
+ branch : update-subtree/library
149
+ delete-branch : true
150
+ base : subtree/library
151
+ path : verify-rust-std
152
+
135
153
- name : Merge subtree/library changes
136
154
if : ${{ env.MERGE_CONFLICTS != 'noop' && env.MERGE_PR_EXISTS == 'no' }}
137
155
run : |
138
- # The below must be done before any call to the create-pull-request
139
- # action as said action resets branches locally, implying that
140
- # `subtree/library` no longer is what the above instructions created.
141
156
cd verify-rust-std
142
- if ! git rev-parse --verify subtree/library; then
157
+ # create-pull-request resets branches locally, implying that
158
+ # `subtree/library` no longer is what the above instructions created.
159
+ if [ "${SUBTREE_PR_EXISTS}" = "yes" ]; then
143
160
git checkout -t -b subtree/library origin/update-subtree/library
161
+ else
162
+ git checkout subtree/library
163
+ git reset --hard origin/update-subtree/library
144
164
fi
145
165
git checkout main
146
166
@@ -173,24 +193,6 @@ jobs:
173
193
git -c user.name=gitbot -c user.email=git@bot \
174
194
commit -m "Update Kani version to ${KANI_COMMIT_HASH}" tool_config/kani-version.toml
175
195
176
- - name : Create Pull Request to update subtree/library
177
- if : ${{ env.MERGE_CONFLICTS != 'noop' && env.SUBTREE_PR_EXISTS == 'no' }}
178
- uses : peter-evans/create-pull-request@v7
179
- with :
180
- title : ' Update subtree/library to ${{ env.NEXT_TOOLCHAIN_DATE }}'
181
- body : >
182
- This is an automated PR to update the subtree/library branch to the changes
183
- from ${{ env.CURRENT_TOOLCHAIN_DATE }} (rust-lang/rust@${{ env.CURRENT_COMMIT_HASH }})
184
- to ${{ env.NEXT_TOOLCHAIN_DATE }} (rust-lang/rust@${{ env.NEXT_COMMIT_HASH }}), inclusive.
185
-
186
- **Review this PR as usual, but do not merge this PR using the GitHub web interface.
187
- Instead, once it is approved, use `git push` to literally push the changes to `subtree/library`
188
- without any rebase or merge.**
189
- branch : update-subtree/library
190
- delete-branch : true
191
- base : subtree/library
192
- path : verify-rust-std
193
-
194
196
- name : Create Pull Request without conflicts
195
197
if : ${{ env.MERGE_CONFLICTS == 'no' && env.MERGE_PR_EXISTS == 'no' }}
196
198
uses : peter-evans/create-pull-request@v7
0 commit comments