防止无限循环

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

View File

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