Skip to content

Commit 26e3d07

Browse files
committed
Update rebase-pr-workflow.yml
1 parent ea1906e commit 26e3d07

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/rebase-pr-workflow.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,31 @@ jobs:
1919
with:
2020
app_id: ${{ secrets.GMODNET_GITHUB_BOT_ID }}
2121
private_key: ${{ secrets.GMODNET_GITHUB_BOT_KEY }}
22-
22+
2323
- name: Configere Git User information
2424
run: |
2525
git config --global user.name "GmodNET GitHub Bot"
2626
git config --global user.email support@gmodnet.xyz
27-
27+
28+
- name: Extract branch name
29+
uses: nelonoel/branch-name@v1.0.1
30+
2831
- name: Checkout
2932
env:
3033
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
3134
run: |
3235
gh repo clone ${{ github.repository }} ./
36+
git checkout ${{ env.BRANCH_NAME }}
3337
gh pr checkout ${{ github.event.inputs.prNumber }}
34-
35-
- name: Extract branch name
36-
uses: nelonoel/branch-name@v1.0.1
37-
38+
3839
- name: Rebase and push
3940
id: rebase_and_push
4041
continue-on-error: true
4142
run: |
42-
git rebase ${BRANCH_NAME}
43+
git rebase ${{ env.BRANCH_NAME }}
4344
git remote set-url origin https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git
4445
git push --force
45-
46+
4647
- name: Notify if rebase was unsuccessful
4748
if: steps.rebase_and_push.outcome == 'failure'
4849
env:

0 commit comments

Comments
 (0)