From cfd399eb752ab2fb60a58dd6cc5317e2fe8ffd64 Mon Sep 17 00:00:00 2001 From: Nripesh Niketan Date: Fri, 3 Jan 2025 15:47:47 +0000 Subject: [PATCH] Chore: Add GitHub Actions workflow to merge main into PR branches --- .github/workflows/PR_merge_main.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/PR_merge_main.yml diff --git a/.github/workflows/PR_merge_main.yml b/.github/workflows/PR_merge_main.yml new file mode 100644 index 00000000..3266a4f1 --- /dev/null +++ b/.github/workflows/PR_merge_main.yml @@ -0,0 +1,23 @@ +name: PR Merge Main +on: + pull_request: + +jobs: + update-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Merge main into PR branch + run: | + git fetch origin main + git checkout ${{ github.head_ref }} + git merge origin/main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Push changes + run: | + git push origin ${{ github.head_ref }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}