From e7f955d71a18032a5b7c4b8f2a1b558aba8fff37 Mon Sep 17 00:00:00 2001 From: Indigo Date: Fri, 9 May 2025 14:05:25 -0700 Subject: [PATCH] Switch to a PR flow --- .github/workflows/sync-fork.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-fork.yml b/.github/workflows/sync-fork.yml index af7f444..07279b3 100644 --- a/.github/workflows/sync-fork.yml +++ b/.github/workflows/sync-fork.yml @@ -27,9 +27,18 @@ jobs: git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - - name: Merge Upstream `main` + - name: Create and Push Branch run: | + git checkout -b weekly-sync-branch-${{ github.run_id }} git merge upstream/main --no-commit git reset -- ./.github git commit -m "Merge upstream:main" - git push + git commit --allow-empty -m "Empty commit to open PR" + git push --set-upstream origin weekly-sync-branch-${{ github.run_id }} + + - name: Open Pull Request + run: | + gh repo set-default actions/maven-dependency-submission-action + gh pr create -B main -H weekly-sync-branch-${{ github.run_id }} --title 'Sync Fork with Upstream' --body 'Weekly Cron. Created by GitHub Actions.' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}