Skip to content

Commit

Permalink
Create auto_merge.yml
Browse files Browse the repository at this point in the history
Signed-off-by: ҉αkα x⠠⠵ <[email protected]>
  • Loading branch information
4k4xs4pH1r3 authored Aug 16, 2024
1 parent c3a8ee9 commit ac8fff6
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/auto_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Auto Update and Merge

on:
schedule:
- cron: '*/45 * * * *' # Run every 45 minutes
pull_request_target:
types: [assigned, unassigned, labeled, unlabeled, opened, edited, reopened, synchronize, ready_for_review, locked, unlocked, review_requested, review_request_removed, auto_merge_enabled, auto_merge_disabled]
branches:
- master # Replace 'target-branch' with your actual branch name


jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0 # Fetch all history for merging
ref: ${{ github.event.pull_request.head.ref }} # Checkout the PR's branch

- name: Merge PR into master
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout master
git pull origin master # Ensure master is up-to-date
git merge ${{ github.event.pull_request.head.ref }} --no-ff # Merge the PR's branch
- name: Push changes
run: git push origin master

0 comments on commit ac8fff6

Please sign in to comment.