Skip to content

[Core] Add CI to sync to GitCode #1

[Core] Add CI to sync to GitCode

[Core] Add CI to sync to GitCode #1

Workflow file for this run

name: "Sync to GitCode"
on:
push:
branches:
- "main"
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up credentials
shell: bash
run: |
mkdir -p ~/.ssh
echo "${{ secrets.GITCODE_SSHKEY_PUBLIC }}" > ~/.ssh/id_ed25519.pub
echo "${{ secrets.GITCODE_SSHKEY_PRIVATE }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
chmod 700 ~/.ssh
- name: Sync with GitCode
shell: bash
run: |
git config --global user.name "GitHub-CI"
git config --global user.email "dummy@gmail.com"
git remote add gitcode git@gitcode.com:preppipe/preppipe-python.git
git push gitcode main -f
git push gitcode --tags