From fdeb36f9ad5dd4741147f2b82b33431f6715b6b9 Mon Sep 17 00:00:00 2001 From: Robin Huang Date: Mon, 13 May 2024 12:39:57 -0700 Subject: [PATCH] Mirror repo. --- .github/workflows/mirror.yaml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/mirror.yaml diff --git a/.github/workflows/mirror.yaml b/.github/workflows/mirror.yaml new file mode 100644 index 00000000..32fdb4b3 --- /dev/null +++ b/.github/workflows/mirror.yaml @@ -0,0 +1,42 @@ +name: Mirror Comfyanonymous/ComfyUI Repo +on: + workflow_dispatch: + schedule: + - cron: '0 * * * *' # Runs every hour, adjust to your needs + +jobs: + mirror: + name: Mirror Repository to Comfyanonymous/ComfyUI + runs-on: ubuntu-latest + steps: + - name: Checkout Mirror Repository + uses: actions/checkout@v4 + + - name: Configure Git + run: | + git config user.name "GitHub Actions Bot" + git config user.email "actions@github.com" + + - name: Add Remote Upstream + run: | + git remote add upstream https://github.com/comfyanonymous/ComfyUI.git + + - name: Fetch Upstream Changes + run: | + git fetch upstream master + + - name: Checkout Master Branch + run: | + git fetch --all + git checkout master + + - name: Rebase Upstream Changes + run: | + git rebase upstream/master + + - name: Push to Mirror + run: | + git remote set-url origin https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com/Comfy-Org/ComfyUI.git + git push origin master -f + env: + GIT_SSH_COMMAND: ssh -v \ No newline at end of file