diff --git a/.github/workflows/merge-upstream.yml b/.github/workflows/merge-upstream.yml index 101dd42369f..688667f78d6 100644 --- a/.github/workflows/merge-upstream.yml +++ b/.github/workflows/merge-upstream.yml @@ -47,28 +47,20 @@ jobs: git config --add user.name 'github-actions[bot]' git config --add user.email '6270544+github-actions[bot]@users.noreply.github.com' - - name: Retrieve the merge base - id: merge-base + - name: Merge the upstream run: | - rev=$(git merge-base upstream/${{ matrix.upstream_branch }} ${{ matrix.base_ref }}) - echo "rev=$rev" > "$GITHUB_OUTPUT" + git merge --strategy ort -X theirs upstream/${{ matrix.upstream_branch }} - name: Filter commits run: | - git switch -C upstream-recipes upstream/${{ matrix.upstream_branch }} git-filter-repo \ - --path recipes/ --refs "${{ steps.merge-base.outputs.rev }}..HEAD" \ + --path recipes/ --refs "${{ steps.start.outputs.rev }}..HEAD" \ --commit-callback ' commit.committer_name = commit.author_name commit.committer_email = commit.author_email commit.committer_date = commit.author_date ' --force - - name: Cherry-pick the filtered commits - run: | - git switch ${{ matrix.base_ref }} - git cherry-pick --strategy ort -X hours ..upstream-recipes - - name: Create a pull request uses: peter-evans/create-pull-request@v5 with: