-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.46 KB
/
openocd.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
49
50
name: OpenOCD
on:
push:
paths:
- '.github/workflows/openocd.yaml'
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
env:
repository_name: elements-openocd
remote_name: git://git.code.sf.net/p/openocd/code
remote_branch: master
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 ../
# SpinalHDL's OpenOCD fork is used but we can't rebase to upstream.
# - 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 ../