forked from open-webui/open-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (55 loc) · 1.98 KB
/
Copy pathsync-upstream.yml
File metadata and controls
62 lines (55 loc) · 1.98 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Sync Fork with Upstream
on:
schedule:
# Run daily at 00:00 UTC
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- 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 remote
run: |
git remote add upstream https://github.com/open-webui/open-webui.git || true
git fetch upstream
- name: Sync main branch
run: |
git checkout origin/main -B main
git merge upstream/main --no-edit || {
echo "Merge conflict detected on main branch"
git merge --abort
exit 1
}
# Remove upstream's docker-build.yaml to prevent duplicate/unwanted builds
if [ -f .github/workflows/docker-build.yaml ]; then
rm .github/workflows/docker-build.yaml
git add .github/workflows/docker-build.yaml
git commit -m "chore: remove upstream docker-build.yaml (using custom ARM64 workflow)" || true
fi
git push origin main
- name: Sync dev branch
run: |
git checkout origin/dev -B dev
git merge upstream/dev --no-edit || {
echo "Merge conflict detected on dev branch"
git merge --abort
exit 1
}
# Remove upstream's docker-build.yaml to prevent duplicate/unwanted builds
if [ -f .github/workflows/docker-build.yaml ]; then
rm .github/workflows/docker-build.yaml
git add .github/workflows/docker-build.yaml
git commit -m "chore: remove upstream docker-build.yaml (using custom ARM64 workflow)" || true
fi
git push origin dev