Skip to content

Commit

Permalink
ci: Simplify the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
akirak committed Nov 3, 2023
1 parent 202e481 commit f62dd5f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/merge-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 hours 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:
Expand Down

0 comments on commit f62dd5f

Please sign in to comment.