forked from desktop/desktop
-
Notifications
You must be signed in to change notification settings - Fork 518
43 lines (41 loc) · 1.4 KB
/
sync-with-upstream.yml
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
name: 'Sync main branch with upstream'
on: workflow_dispatch
jobs:
sync-with-upstream:
runs-on: ubuntu-latest
name: Sync main branch with upstream
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.CREATE_RELEASE_AUTOMATION_TOKEN }}
- name: Configure git
run: |
git config --global user.name "shiftbot"
git config --global user.email "[email protected]"
git remote add upstream https://github.com/desktop/desktop.git
shell: bash
- name: Push development changes from upstream to fork
id: sync-development-branch
run: |
git fetch upstream development
git fetch origin --unshallow
git fetch origin development
git checkout -b development upstream/development
git push origin development
shell: bash
- name: Rebase Linux customizations on top of development branch
id: rebase-linux-branch
run: |
git fetch origin linux
git checkout linux
git log linux...development --oneline
git rebase --verbose development linux
shell: bash
continue-on-error: true
- name: Review current status
id: status
run: |
git status
shell: bash
# TODO: force push this when we're confident that the rebase has succeeded?