Unverified Commit a161ddfd authored by Muyang Li's avatar Muyang Li Committed by GitHub
Browse files

[Dont Sync] update the sync CI (#552)

* add sync ci

* rename the repo name
parent 57defc8a
name: Synchronize to Private Repository name: Synchronize to Private Repository
on: on:
workflow_dispatch:
push: push:
branches: branches:
- dev - main
permissions: permissions:
contents: write contents: write
jobs: jobs:
cherry-pick-commits: cherry-pick-commits:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'mit-han-lab/nunchaku' if: github.repository == 'nunchaku-tech/nunchaku'
steps: steps:
- name: Clone private repository - name: Clone private repository
run: | run: |
git clone https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/mit-han-lab/nunchaku-dev.git git clone https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/nunchaku-tech/nunchaku-dev.git
- name: Add public remote and fetch - name: Add public remote and fetch
run: | run: |
cd nunchaku-dev cd nunchaku-dev
git remote add public https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/mit-han-lab/nunchaku.git git remote add public https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/nunchaku-tech/nunchaku.git
git fetch public dev git fetch public main
- name: Cherry-pick latest commit from public/dev - name: Cherry-pick latest commit from public/main
run: | run: |
set -e set -e
cd nunchaku-dev cd nunchaku-dev
COMMIT=$(git rev-parse public/dev) COMMIT=$(git rev-parse public/main)
COMMIT_MSG=$(git log -1 --pretty=%B $COMMIT) COMMIT_MSG=$(git log -1 --pretty=%B $COMMIT)
echo "Latest commit: $COMMIT" echo "Latest commit: $COMMIT"
...@@ -53,7 +52,6 @@ jobs: ...@@ -53,7 +52,6 @@ jobs:
IGNORED_FILES=( IGNORED_FILES=(
".github/workflows/sync-to-private.yml" ".github/workflows/sync-to-private.yml"
".github/workflows/auto-merge-main-into-dev.yml"
) )
echo "Attempting cherry-pick..." echo "Attempting cherry-pick..."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment