-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff94881
commit 5cd0960
Showing
1 changed file
with
5 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,8 @@ jobs: | |
|
||
steps: | ||
# Checkout the token branch which was pushed | ||
- name: Checkout Token Branch | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref_name }} | ||
|
||
# Check if the PR branch corresponding to the token branch exists | ||
- name: Get PR Branch | ||
|
@@ -35,20 +33,12 @@ jobs: | |
fi | ||
# if the branch exits, update the PR | ||
- name: Checkout PR Branch | ||
if: steps.pr-branch.outputs.exists == 'true' | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ steps.pr-branch.outputs.name }} | ||
clean: false | ||
|
||
- name: Update PR Branch | ||
- name: Update PR | ||
if: steps.pr-branch.outputs.exists == 'true' | ||
run: | | ||
git config user.name "Swiss Post Bot" | ||
git config user.email "[email protected]" | ||
git merge ${{ github.ref_name }} -X theirs --no-edit | ||
git push origin ${{ steps.pr-branch.outputs.name }} | ||
gh pr edit ${{ steps.pr-branch.outputs.name }} --base ${{ github.ref_name }} | ||
gh pr update-branch ${{ steps.pr-branch.outputs.name }} | ||
gh pr edit ${{ steps.pr-branch.outputs.name }} --base main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }} | ||
|
||
|