diff --git a/.gitea/workflows/AutoGenerateREADME.yaml b/.gitea/workflows/AutoGenerateREADME.yaml index 92e8bf2..4e45478 100644 --- a/.gitea/workflows/AutoGenerateREADME.yaml +++ b/.gitea/workflows/AutoGenerateREADME.yaml @@ -1,4 +1,4 @@ -name: Create README +name: Create README with Commit History on: push: @@ -8,6 +8,7 @@ on: jobs: create-readme: runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'Create README with commit history')" steps: - name: Checkout code from Gitea @@ -45,12 +46,12 @@ jobs: 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 config --local user.email "liyepan@linuxacme.com" + git config --local user.name "iorebuild" git add README.md if git diff --staged --quiet; then echo "No changes to commit." else - git commit -m "Create README with repository name" + git commit -m "Create README with commit history" git push "https://${GITEA_TOKEN}@${CLEAN_REPO_URL}" fi \ No newline at end of file