Skip to content

Commit aed7eab

Browse files
committed
Fix order
1 parent 19b715d commit aed7eab

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

.github/workflows/update-subtree.yml

+22-19
Original file line numberDiff line numberDiff line change
@@ -132,28 +132,12 @@ jobs:
132132
echo "MERGE_CONFLICTS=maybe" >> $GITHUB_ENV
133133
fi
134134
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-
153135
- name: Merge subtree/library changes
154136
if: ${{ env.MERGE_CONFLICTS != 'noop' && env.MERGE_PR_EXISTS == 'no' }}
155137
run: |
156-
set -vx
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.
157141
cd verify-rust-std
158142
if ! git rev-parse --verify subtree/library; then
159143
git checkout -t -b subtree/library origin/update-subtree/library
@@ -188,6 +172,25 @@ jobs:
188172
sed -i "s/commit = .*/commit = \"${KANI_COMMIT_HASH}\"/" tool_config/kani-version.toml
189173
git -c user.name=gitbot -c user.email=git@bot \
190174
commit -m "Update Kani version to ${KANI_COMMIT_HASH}" tool_config/kani-version.toml
175+
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+
191194
- name: Create Pull Request without conflicts
192195
if: ${{ env.MERGE_CONFLICTS == 'no' && env.MERGE_PR_EXISTS == 'no' }}
193196
uses: peter-evans/create-pull-request@v7

0 commit comments

Comments
 (0)