From 80d33e19909fff36d7d42c4cd36afdbae9dded2f Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Thu, 18 Jun 2026 15:06:46 +0800 Subject: [PATCH] chore(ci): merge CNB and AtomGit mirror sync into single workflow --- .github/workflows/sync-mirrors.yml | 47 ++++++++++++++++++++++++++++++ .github/workflows/sync-to-cnb.yml | 34 --------------------- 2 files changed, 47 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/sync-mirrors.yml delete mode 100644 .github/workflows/sync-to-cnb.yml diff --git a/.github/workflows/sync-mirrors.yml b/.github/workflows/sync-mirrors.yml new file mode 100644 index 000000000..0a52dece5 --- /dev/null +++ b/.github/workflows/sync-mirrors.yml @@ -0,0 +1,47 @@ +name: Sync Mirrors + +on: + push: + branches: + - main + tags: + - "**" + delete: + workflow_dispatch: + +jobs: + sync-cnb: + name: Sync to CNB + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Push to CNB + env: + CNB_TOKEN: ${{ secrets.CNB_TOKEN }} + run: | + set -euo pipefail + git remote add cnb "https://cnb:${CNB_TOKEN}@cnb.cool/dbxio.com/dbx.git" + git push cnb --all --force + git push cnb --tags --force + + sync-atomgit: + name: Sync to AtomGit + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Push to AtomGit + env: + ATOMGIT_TOKEN: ${{ secrets.ATOMGIT_TOKEN }} + run: | + set -euo pipefail + git remote add atomgit "https://t8y2:${ATOMGIT_TOKEN}@atomgit.com/t8y2/dbx.git" + git push atomgit --all --force + git push atomgit --tags --force diff --git a/.github/workflows/sync-to-cnb.yml b/.github/workflows/sync-to-cnb.yml deleted file mode 100644 index c84b0a14c..000000000 --- a/.github/workflows/sync-to-cnb.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Sync to CNB - -on: - push: - branches: - - main - tags: - - "**" - delete: - workflow_dispatch: - -env: - CNB_REPOSITORY: "dbxio.com/dbx" - CNB_USERNAME: "cnb" - -jobs: - sync: - name: Sync repository to CNB - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Push to CNB mirror - env: - CNB_TOKEN: ${{ secrets.CNB_TOKEN }} - run: | - set -euo pipefail - - git remote add cnb "https://${CNB_USERNAME}:${CNB_TOKEN}@cnb.cool/${CNB_REPOSITORY}.git" - git push cnb --all --force - git push cnb --tags --force