From 8687b1fc853564b1a97d0616eb7a7b75121a6491 Mon Sep 17 00:00:00 2001 From: liyp Date: Thu, 10 Apr 2025 15:50:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=88=E5=88=A0=E6=8E=89log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/AutoGenerateREADME.yaml | 30 ------------------------ 1 file changed, 30 deletions(-) diff --git a/.gitea/workflows/AutoGenerateREADME.yaml b/.gitea/workflows/AutoGenerateREADME.yaml index 65bce31..d60565b 100644 --- a/.gitea/workflows/AutoGenerateREADME.yaml +++ b/.gitea/workflows/AutoGenerateREADME.yaml @@ -30,36 +30,6 @@ jobs: run: | echo "# ActionDemo测试文档标题" > README.md - # 获取所有提交记录,包含提交哈希、作者、日期和提交信息 - commits=$(git log --pretty=format:"%ct %h %an %ad %s" --date=short) - - # 获取所有版本标签及其关联的提交哈希和日期 - tags=$(git for-each-ref --sort=creatordate --format='%(creatordate:unix) %(objectname) %(refname:strip=2)' refs/tags) - - # 合并提交记录和版本标签信息,并按时间排序 - all_entries="$commits - $tags" - sorted_entries=$(echo "$all_entries" | sort -n) - - # 遍历排序后的记录并写入 README - for entry in $sorted_entries; do - timestamp=$(echo $entry | cut -d ' ' -f 1) - hash_or_tag=$(echo $entry | cut -d ' ' -f 2) - rest=$(echo $entry | cut -d ' ' -f 3-) - - # 检查是否为版本标签 - if [[ $hash_or_tag == refs/tags/* ]]; then - tag_name=${hash_or_tag#refs/tags/} - echo "## Version $tag_name" >> README.md - else - commit_hash=$hash_or_tag - author=$(echo $rest | cut -d ' ' -f 1) - date=$(echo $rest | cut -d ' ' -f 2) - message=$(echo $rest | cut -d ' ' -f 3-) - echo "- $commit_hash $author $date $message" >> README.md - fi - done - - name: Commit and push changes env: GITEA_TOKEN: ${{ secrets.AUTOGENERATE }}