重写commit
All checks were successful
Create README / create-readme (push) Successful in 12s

This commit is contained in:
liyp 2025-04-10 15:31:11 +08:00
parent a134b01d34
commit d8d21b600c

View File

@ -30,7 +30,13 @@ jobs:
cat README.md cat README.md
- name: Commit and push changes - 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: | run: |
# 去除多余的 https://
CLEAN_REPO_URL="${CLEAN_REPO_URL#https://}"
git config --local user.email "action@github.com" git config --local user.email "action@github.com"
git config --local user.name "GitHub Action" git config --local user.name "GitHub Action"
git add README.md git add README.md
@ -38,5 +44,5 @@ jobs:
echo "No changes to commit." echo "No changes to commit."
else else
git commit -m "Create README with repository name" 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 fi