From 0f2ed0af44bd478532f35ddb93af13f96cf9dc53 Mon Sep 17 00:00:00 2001 From: Robin Huang Date: Fri, 10 May 2024 17:37:02 -0700 Subject: [PATCH] Add Mirror github workflow. --- .github/workflows/mirror.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 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..12b810ab --- /dev/null +++ b/.github/workflows/mirror.yaml @@ -0,0 +1,26 @@ +on: + workflow_dispatch: + schedule: + - cron: '0 * * * *' # Runs every hour, adjust to your needs + +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for all branches and tags + + - name: Set up Git + run: | + git config --global user.email "gitbot@drip.art" + git config --global user.name "Git Bot" + + - name: Push to Master Branch Only + run: | + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/Comfy-Org/Comfyui.git + git fetch origin master + git checkout master + git merge --ff-only FETCH_HEAD + git push origin master \ No newline at end of file