diff --git a/.github/workflows/sync_branches_reusable_workflow.yml b/.github/workflows/sync_branches_reusable_workflow.yml index 9e88e5889c..8ccbfc6aa7 100644 --- a/.github/workflows/sync_branches_reusable_workflow.yml +++ b/.github/workflows/sync_branches_reusable_workflow.yml @@ -9,6 +9,9 @@ on: target-branch: required: true type: string + commit-id: + required: true + type: string secrets: ssh-key: description: 'Deploy token write access' @@ -35,6 +38,7 @@ jobs: - name: Rebase and Push run: | git fetch origin ${{ inputs.source-branch }} + git reset --hard ${{ inputs.commit-id }} git checkout ${{ inputs.target-branch }} git rebase ${{ inputs.source-branch }} git push --force origin ${{ inputs.target-branch }} diff --git a/.github/workflows/sync_branches_with_ext_trigger.yml b/.github/workflows/sync_branches_with_ext_trigger.yml index 2e59a615ab..1dd5e2ab7d 100644 --- a/.github/workflows/sync_branches_with_ext_trigger.yml +++ b/.github/workflows/sync_branches_with_ext_trigger.yml @@ -10,5 +10,6 @@ jobs: with: source-branch: ${{ github.event.client_payload.source-branch }} target-branch: ${{ github.event.client_payload.target-branch }} + commit-id: ${{ github.event.client_payload.commit-id || "HEAD"}} secrets: ssh-key: ${{ secrets.DEPLOY_KEY }}