From d8d21b600cf1a222178062aee462823bb91a98cb Mon Sep 17 00:00:00 2001 From: liyp Date: Thu, 10 Apr 2025 15:31:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=86=99commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/AutoGenerateREADME.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/AutoGenerateREADME.yaml b/.gitea/workflows/AutoGenerateREADME.yaml index 9cbd5ee..aaf06d4 100644 --- a/.gitea/workflows/AutoGenerateREADME.yaml +++ b/.gitea/workflows/AutoGenerateREADME.yaml @@ -30,7 +30,13 @@ jobs: cat README.md - name: Commit and push changes + env: + GITEA_TOKEN: ${{ secrets.AUTOGENERATE }} + GITEA_REPO_URL: ${{ github.server_url }}/${{ github.repository }} + CLEAN_REPO_URL: ${{ github.server_url }}/${{ github.repository }} run: | + # 去除多余的 https:// + CLEAN_REPO_URL="${CLEAN_REPO_URL#https://}" git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add README.md @@ -38,5 +44,5 @@ jobs: echo "No changes to commit." else git commit -m "Create README with repository name" - git push "https://AUTOGENERATE@${{ github.server_url }}/${{ github.repository }}" + git push "https://${GITEA_TOKEN}@${CLEAN_REPO_URL}" fi \ No newline at end of file