This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 47
76 lines (62 loc) · 2.58 KB
/
alpha_backport.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# This automated work flow is responsible for backporting changes from the beta
# branch to the alpha branch.
name: Backport
on:
workflow_dispatch:
schedule:
# You can setup schedule here
- cron: '0 0 * * *'
jobs:
stable:
runs-on: ubuntu-latest
if: always()
env:
# replace "github_username" with your GitHub username
# replace "github.com/username/repo.git" with your GitHub repo path
# do NOT replace ${{secrets.GITHUB_TOKEN}}, GitHub will take care of it
MY_REPO: https://fushra-bot:${{secrets.GITHUB_TOKEN}}@github.com/pulse-browser/browser.git
# replace "long-lived_branch_name" with your branch name
MY_BRANCH: beta
# replace it with the path to master repo
MASTER_REPO: https://github.com/pulse-browser/browser.git
# replace "master" with your master branch name
MASTER_BRANCH: stable
steps:
- name: Merge with master
run: |
git clone ${{env.MY_REPO}} -b ${{env.MY_BRANCH}} tmp
cd tmp
git config user.name "Fushra Bot"
git config user.email "[email protected]"
git config pull.rebase true
git pull ${{env.MASTER_REPO}} ${{env.MASTER_BRANCH}}
git pull ${{env.MASTER_REPO}} ${{env.MY_BRANCH}}
git commit --amend -m "🔀 Backport changes from ${{env.MASTER_BRANCH}} to ${{env.MY_BRANCH}}"
git push
beta:
runs-on: ubuntu-latest
needs: [stable]
if: always()
env:
# replace "github_username" with your GitHub username
# replace "github.com/username/repo.git" with your GitHub repo path
# do NOT replace ${{secrets.GITHUB_TOKEN}}, GitHub will take care of it
MY_REPO: https://fushra-bot:${{secrets.GITHUB_TOKEN}}@github.com/pulse-browser/browser.git
# replace "long-lived_branch_name" with your branch name
MY_BRANCH: alpha
# replace it with the path to master repo
MASTER_REPO: https://github.com/pulse-browser/browser.git
# replace "master" with your master branch name
MASTER_BRANCH: beta
steps:
- name: Merge with master
run: |
git clone ${{env.MY_REPO}} -b ${{env.MY_BRANCH}} tmp
cd tmp
git config user.name "Fushra Bot"
git config user.email "[email protected]"
git config pull.rebase true
git pull ${{env.MASTER_REPO}} ${{env.MASTER_BRANCH}}
git pull ${{env.MASTER_REPO}} ${{env.MY_BRANCH}}
git commit --amend -m "🔀 Backport changes from ${{env.MASTER_BRANCH}} to ${{env.MY_BRANCH}}"
git push