防止无限循环

This commit is contained in:
liyp 2025-04-10 16:02:28 +08:00
parent 9896d69149
commit 951afe4e61

View File

@ -4,7 +4,8 @@ on:
push: push:
branches: branches:
- main - main
# 添加条件判断
if: "!contains(github.event.head_commit.message, 'AutoGenerateREADME.md')"
jobs: jobs:
create-readme: create-readme:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -47,6 +48,6 @@ jobs:
if git diff --staged --quiet; then if git diff --staged --quiet; then
echo "No changes to commit." echo "No changes to commit."
else else
git commit -m "Create README with commit history" git commit -m "AutoGenerateREADME.md"
git push "https://${GITEA_TOKEN}@${CLEAN_REPO_URL}" git push "https://${GITEA_TOKEN}@${CLEAN_REPO_URL}"
fi fi