chore(ci): merge CNB and AtomGit mirror sync into single workflow

This commit is contained in:
t8y2 committed 2026-06-18 15:06:46 +08:00
1 parent 5ffd0bad6c
commit 80d33e1990
2 files changed
+47 -34

No files matched your search

+47
View File
@@ -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