From bbb6ec199a4e0a00c62474cd95879c8187d1ccbe Mon Sep 17 00:00:00 2001 From: xiehaijun Date: Mon, 28 Jul 2025 14:54:50 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/demo.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发布tag,发布生产 --- .gitea/workflows/demo.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index b6c96ab..5ae5576 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -229,11 +229,19 @@ jobs: id: vars run: echo "tag=release-$(TZ='Asia/Shanghai' date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT # 包含$GITHUB_ENV 的作用域,全steps也可访问 - name: 自定提交tag + env: + GITEA_USER: xiehaijun + TAG: ${{ steps.vars.outputs.tag }} + GITEA_PAT: ${{ secrets.MY_APP_TOKEN }} + GITEA_REPO: xiehaijun/study-plan + GITEA_HOST: git.ewancle.com run: | - git config user.name "github-actions" + git config user.name "github-actions[bot]" git config user.email "actions@github.com" git tag -a ${{ steps.vars.outputs.tag }} -m "Automated release" - git push origin ${{ steps.vars.outputs.tag }} + # git push origin ${{ steps.vars.outputs.tag }} + # git push https://x-access-token:${PAT_PUSH}@github.com/${REPO}.git "$TAG" + git push https://${GITEA_USER}:${GITEA_PAT}@${GITEA_HOST}/${GITEA_REPO}.git "$TAG" - name: 获取跨job上游job的输出变量值 run: echo "The tag from previous job is ${{ needs.upload.outputs.tag-name }}" - name: Download All Artifacts