防止无限循环
This commit is contained in:
parent
9896d69149
commit
951afe4e61
@ -4,11 +4,12 @@ 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
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 检出仓库
|
- name: 检出仓库
|
||||||
env:
|
env:
|
||||||
@ -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
|
Loading…
Reference in New Issue
Block a user