From 05a0b27c4047d2a1f4cc8e373b94637eec215b4e Mon Sep 17 00:00:00 2001 From: Shakar Bakr <5h4k4r.b4kr@gmail.com> Date: Thu, 19 Oct 2023 11:42:01 +0300 Subject: [PATCH] Rebase the target branch on to main Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com> --- action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/action.yml b/action.yml index 7523b9e..64c3768 100644 --- a/action.yml +++ b/action.yml @@ -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: | @@ -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