Skip to content

chore(release): 更新版本号至 3.0.3,修复 Dockerfile source 标签和 CICD 文档 #10

chore(release): 更新版本号至 3.0.3,修复 Dockerfile source 标签和 CICD 文档

chore(release): 更新版本号至 3.0.3,修复 Dockerfile source 标签和 CICD 文档 #10

Workflow file for this run

name: Mirror to Gitee & Gitcode
on:
push:
branches: [main, master]
tags:
- 'v*'
workflow_dispatch:
jobs:
mirror:
name: Mirror Code
runs-on: ubuntu-latest
if: github.repository == 'qinshihu/itops-agent-platform'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Git
run: |
git config --global user.name "qinshihu"
git config --global user.email "huawei_network@foxmail.com"
- name: Push to Gitee
env:
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
run: |
echo "Setting up Gitee remote..."
git remote add gitee https://oauth2:${GITEE_TOKEN}@gitee.com/IT_Oline/itops-agent-platform.git || git remote set-url gitee https://oauth2:${GITEE_TOKEN}@gitee.com/IT_Oline/itops-agent-platform.git
echo "Pushing branches to Gitee..."
git push gitee main --force --verbose 2>&1
echo "Pushing tags to Gitee..."
git push gitee --tags --force --verbose 2>&1
echo "Gitee sync completed!"
- name: Push to Gitcode
env:
GITCODE_TOKEN: ${{ secrets.GITCODE_TOKEN }}
run: |
echo "Setting up Gitcode remote..."
git remote add gitcode https://oauth2:${GITCODE_TOKEN}@gitcode.com/gcw_IM7aAihp/itops-agent-platform.git || git remote set-url gitcode https://oauth2:${GITCODE_TOKEN}@gitcode.com/gcw_IM7aAihp/itops-agent-platform.git
echo "Pushing branches to Gitcode..."
git push gitcode main --force --verbose 2>&1
echo "Pushing tags to Gitcode..."
git push gitcode --tags --force --verbose 2>&1
echo "Gitcode sync completed!"