-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.39 KB
/
zephyr.yaml
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
name: Zephyr
on:
push:
paths:
- '.github/workflows/zephyr.yaml'
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
env:
repository_name: elements-zephyr
remote_name: https://github.com/zephyrproject-rtos/zephyr.git
remote_branch: main
steps:
- name: Clone Repository
run: |
rm -rf ${{ env.repository_name }}
git clone https://elements-user:${{ secrets.PAT }}@github.com/aesc-silicon/${{ env.repository_name }}.git ${{ env.repository_name }}
cd ${{ env.repository_name }}
git config --global user.email "[email protected]"
git config --global user.name "Elements CI"
git remote add upstream ${{ env.remote_name }}
git fetch upstream
cd ../
- name: Pull Upstream
run: |
cd ${{ env.repository_name }}
git checkout upstream
git pull upstream ${{ env.remote_branch }}
git push origin HEAD:upstream -f
cd ../
- name: Rebase to "rebased"
run: |
cd ${{ env.repository_name }}
git checkout rebased
git rebase upstream/${{ env.remote_branch }}
git push origin HEAD:rebased -f
cd ../
- name: Merge to "main"
run: |
cd ${{ env.repository_name }}
git checkout main
git merge upstream/${{ env.remote_branch }}
git push origin HEAD:main -f
cd ../