diff --git a/.github/workflows/merge-upstream.yml b/.github/workflows/merge-upstream.yml index f1ce38a399c..c4dadd335b0 100644 --- a/.github/workflows/merge-upstream.yml +++ b/.github/workflows/merge-upstream.yml @@ -42,17 +42,17 @@ jobs: git config --add user.email '6270544+github-actions[bot]@users.noreply.github.com' - name: Retrieve the merge base - id: merge-base run: | rev=$(git merge-base ${{ steps.upstream.outputs.ref }} ${{ steps.start.outputs.rev }}) - echo "rev=$rev" >> "$GITHUB_OUTPUT" + git switch -C merge-base "$rev" + git push --force origin HEAD - name: Filter commits run: | tmp="recipes-$(date +%s)" git switch -c "$tmp" ${{ steps.upstream.outputs.ref }} nix run nixpkgs#git-filter-repo -- \ - --path recipes/ --refs "${{ steps.merge-base.outputs.rev }}..HEAD" \ + --path recipes/ --refs "merge-base..HEAD" \ --commit-callback ' commit.committer_name = commit.author_name commit.committer_email = commit.author_email @@ -68,8 +68,8 @@ jobs: - name: Create a pull request uses: peter-evans/create-pull-request@v5 with: - base: ${{ steps.merge-base.outputs.rev }} + base: merge-base token: ${{ secrets.PAT_FOR_PR }} title: 'Merge the upstream recipe commits' - branch: create-pull-request/merge-recipes + branch: upstream-recipes labels: automation