-
-
Notifications
You must be signed in to change notification settings - Fork 69
35 lines (27 loc) · 832 Bytes
/
main_sync.yml
File metadata and controls
35 lines (27 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Sync Main to Data Branch
on:
workflow_dispatch:
permissions:
contents: write # Ensure the workflow has write access to contents
jobs:
sync-to-data-branch:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global user.name 'devb'
git config --global user.email 'git@devb.io'
- name: Sync Main to Data Branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Create data branch if it doesn't exist
git checkout -B data origin/data 2>/dev/null || git checkout -b data
# Merge main into data branch
git merge main
# Push changes to data branch
git push origin data