diff --git a/.workflow/fetch.yml b/.workflow/fetch.yml index 76b7fa4..58916ec 100644 --- a/.workflow/fetch.yml +++ b/.workflow/fetch.yml @@ -22,37 +22,11 @@ stages: - npm config set registry https://registry.npmmirror.com - '# 执行编译命令' - npm install && node fetchURLByWasm.js - - '' + - git config user.name "Gitee流水线" + - git config user.email "actions@githee.com" + - git add . + - git diff --quiet && git diff --staged --quiet || git commit -m "Update by Gitee流水线" + - git push strategy: retry: '0' timeout: 5 - - name: push_repo - displayName: push_repo - strategy: naturally - trigger: auto - executor: [] - steps: - - step: build@nodejs - name: push_repo - displayName: push_repo - nodeVersion: 21.5.0 - commands: - - '# actions提交' - - git config user.name "Gitee Actions" - - git config user.email "actions@githee.com" - - '# echo "开始执行" >> interface.txt.bak' - - git add . - - git diff --quiet && git diff --staged --quiet || git commit -m "Update by Gitee Actions" - - git push - - '' - artifacts: - - name: BUILD_ARTIFACT - path: - - ./dist - caches: - - ~/.npm - - ~/.yarn - notify: [] - strategy: - retry: '0' - timeout: 1 diff --git a/.workflow/tt.yml b/.workflow/tt.yml deleted file mode 100644 index 35a4396..0000000 --- a/.workflow/tt.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: '1.0' -name: tt -displayName: tt -triggers: - trigger: auto - schedule: - - cron: '* 0 */3 * * ? *' -image: node:18 # 使用 Node.js 基础镜像 -stages: - - run - - commit -run: - stage: run - script: - - echo "安装依赖..." - - npm install - - echo "执行 Node.js 脚本..." - - node fetchURLByWasm.js - - echo "脚本执行完成,查看文件变化..." - - git status -commit: - stage: commit - script: - - echo "配置 Git 用户信息..." - - git config --global user.name "Gitee 流水线" - - git config --global user.email "pipeline@gitee.com" - - echo "检查是否有文件变更..." - - if [ -n "$(git status --porcelain)" ]; then echo "有文件变更,准备提交..."; git add .; git commit -m "流水线自动提交 $(date +'%Y-%m-%d %H:%M:%S')"; git push https://${TOKEN}@gitee.com/${GITEE_REPO}.git HEAD:${GITEE_BRANCH}; else echo "没有文件变更,跳过提交"; fi - only: - - main # 只在 main 分支触发,可根据需要修改