Skip to content

Commit

Permalink
Chore: Add GitHub Actions workflow to merge main into PR branches
Browse files Browse the repository at this point in the history
  • Loading branch information
NripeshN committed Jan 3, 2025
1 parent f2e0cab commit cfd399e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/PR_merge_main.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit cfd399e

Please sign in to comment.