From ce051af5bba8969d0c51f96370dbe53766d84fb2 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 30 Dec 2025 01:05:57 +0800 Subject: [PATCH] chore: atom git push --- .github/workflows/sync-to-atomgit-dev.yml | 34 +++++++++++++++++++++++ .github/workflows/sync-to-atomgit.yml | 4 +-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/sync-to-atomgit-dev.yml diff --git a/.github/workflows/sync-to-atomgit-dev.yml b/.github/workflows/sync-to-atomgit-dev.yml new file mode 100644 index 000000000..43df7c131 --- /dev/null +++ b/.github/workflows/sync-to-atomgit-dev.yml @@ -0,0 +1,34 @@ +name: sync-to-atomgit-dev +on: + push: + branches: ['v2-dev'] +# schedule: +# - # 国际时间 19:17 执行,北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间 +# - cron: '17 19 * * *' +permissions: + contents: read + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout work repo # 1. 检出当前仓库(certd-sync-work) + uses: actions/checkout@v4 + with: + fetch-depth: 0 + lfs: true + - name: Set git user # 2. 给git命令设置用户名和邮箱,↙↙↙ 改成你的name和email + run: | + git config --global user.name "xiaojunnuo" + git config --global user.email "xiaojunnuo@qq.com" + + - name: Set git token # 3. 给git命令设置token,用于push到目标仓库 + uses: de-vri-es/setup-git-credentials@v2 + with: # token 格式为: username:password + credentials: https://greper:${{secrets.ATOMGIT_TOKEN}}@atomgit.com + + - name: push to atomgit # 4. 执行同步 + run: | + git remote add upstream https://atomgit.com/certd/certd + git push --set-upstream upstream v2-dev + diff --git a/.github/workflows/sync-to-atomgit.yml b/.github/workflows/sync-to-atomgit.yml index 19fcac6a5..f18e1d17c 100644 --- a/.github/workflows/sync-to-atomgit.yml +++ b/.github/workflows/sync-to-atomgit.yml @@ -1,7 +1,7 @@ name: sync-to-atomgit on: push: - branches: ['v2-dev'] + branches: ['v2'] # schedule: # - # 国际时间 19:17 执行,北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间 # - cron: '17 19 * * *' @@ -30,5 +30,5 @@ jobs: - name: push to atomgit # 4. 执行同步 run: | git remote add upstream https://atomgit.com/certd/certd - git push --set-upstream upstream v2-dev + git push --set-upstream upstream v2