Skip to content

Commit

Permalink
Update create-token-pr.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
alizedebray committed Oct 16, 2024
1 parent ff94881 commit 5cd0960
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/create-token-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

Expand Down

0 comments on commit 5cd0960

Please sign in to comment.