Skip to content

Commit

Permalink
Create auto-update-dev.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh authored Dec 22, 2024
1 parent 1416bbd commit b2ce7c8
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/auto-update-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Auto-Update Dev Branch from Master

on:
push:
branches:
- master # Trigger workflow on commits to 'dev' branch

jobs:
update-main:
runs-on: ubuntu-latest
permissions:
contents: write # Required to push to protected branches

steps:
- name: Checkout Main Branch
uses: actions/checkout@v4
with:
ref: dev
fetch-depth: 0
ssh-key: ${{ secrets.DEPLOY_KEY }}

- name: Configure Git User
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
- name: Merge auto-update into dev
run: |
git fetch origin master:master
git merge --no-ff master -m "Auto-merge updates from master branch"
- name: Push Changes to Main
run: |
git push origin dev

0 comments on commit b2ce7c8

Please sign in to comment.