forked from chrisj951/MainPyUI
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 964 Bytes
/
sync.yml
File metadata and controls
39 lines (32 loc) · 964 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
36
37
38
39
name: Sync Fork with Upstream
on:
schedule:
- cron: "0 4 * * *" # runs daily at 04:00 UTC
workflow_dispatch:
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout the fork
uses: actions/checkout@v4
with:
fetch-depth: 0 # important! ensures full history is available
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Add upstream and fetch
run: |
git remote add upstream https://github.com/chrisj951/MainPyUI.git
git fetch upstream
- name: Merge upstream changes
run: |
git checkout main
git merge upstream/main --no-edit
- name: Push changes to fork
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin main