Skip to content

Commit

Permalink
Rebase the target branch on to main
Browse files Browse the repository at this point in the history
Signed-off-by: Shakar Bakr <[email protected]>
  • Loading branch information
5h4k4r committed Oct 19, 2023
1 parent fb27783 commit 05a0b27
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ runs:
- name: Create branch if not exists
shell: bash
env:
TARGET_FILE: ${{ inputs.component-name }}/${{ steps.find-target-file.outputs.target_file }}
TARGET_BRANCH: update-${{ steps.get-environment.outputs.environment }}-${{ inputs.component-name }}
run: |
Expand All @@ -109,6 +110,13 @@ runs:
git push --set-upstream origin "$TARGET_BRANCH"
fi
git fetch
git rebase $TARGET_BRANCH
git checkout --theirs $TARGET_FILE
git add $TARGET_FILE
git rebase --continue
git push --force
# Use the REST API to commit changes, so we get automatic commit signing
- name: Commit changes
shell: bash
Expand Down

0 comments on commit 05a0b27

Please sign in to comment.