Skip to content

OpenOCD

OpenOCD #1171

Workflow file for this run

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 ../