This repository was archived by the owner on Jan 6, 2026. It is now read-only.
forked from QuestCraftPlusPlus/QCXR-XR-Wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.59 KB
/
sync_upstream.yml
File metadata and controls
56 lines (47 loc) · 1.59 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
name: sync_upstream
on:
schedule:
- cron: '0 3 */3 * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout fork
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set Git identity
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/QuestCraftPlusPlus/QCXR-XR-Wrapper.git
- name: Fetch upstream changes
run: git fetch upstream
- name: Merge upstream/master into fork/master
id: merge
run: |
git checkout master
git merge upstream/master --no-edit || echo "conflict" > .conflict
- name: Check for merge conflicts
id: check_conflict
run: |
if [ -f .conflict ]; then
echo "conflict=true" >> $GITHUB_OUTPUT
else
echo "conflict=false" >> $GITHUB_OUTPUT
fi
- name: Push changes to fork
if: steps.check_conflict.outputs.conflict == 'false'
env:
PAT: ${{ secrets.PAT }}
run: |
git push https://x-access-token:${PAT}@github.com/${{ github.repository }} master
- name: Create conflict issue
if: steps.check_conflict.outputs.conflict == 'true'
uses: peter-evans/create-issue-from-file@v5
with:
title: "⚠️ Merge Conflict with Upstream"
content-filepath: .github/conflict-template.md
labels: merge-conflict