Skip to content

Commit

Permalink
Merge pull request #30 from wobkobi/dev
Browse files Browse the repository at this point in the history
updating actions
  • Loading branch information
wobkobi authored Jun 4, 2024
2 parents 27386dc + de10aa3 commit 8a5f5ae
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions .github/workflows/sync-dev-with-main.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
name: Sync dev with main
name: Update Dev Branch

on:
schedule:
- cron: '0 0 * * *' # This runs every day at midnight, adjust as needed
push:
branches:
- main

jobs:
sync:
update-dev:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3 # Updated to use the latest version
- name: Checkout main branch
uses: actions/checkout@v3
with:
ref: main

- name: Set up Git
- name: Configure git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Fetch all branches
run: git fetch --all
Expand All @@ -27,14 +26,9 @@ jobs:
run: git checkout dev

- name: Merge main into dev
run: git merge origin/main || echo "Merge conflict detected, aborting." && git merge --abort
run: git merge main

- name: Push changes
run: |
if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]; then
git push origin dev
else
echo "No changes to push."
fi
- name: Push changes to dev
run: git push origin dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1 comment on commit 8a5f5ae

@vercel
Copy link

@vercel vercel bot commented on 8a5f5ae Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.