From 3027e9e6a73dcb5de72d2b1fa9ddd000ced871fc Mon Sep 17 00:00:00 2001 From: zhiyi Date: Fri, 4 Oct 2024 05:00:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-generate-pac.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-generate-pac.yml b/.github/workflows/auto-generate-pac.yml index 5ba52ea..4e1dc39 100644 --- a/.github/workflows/auto-generate-pac.yml +++ b/.github/workflows/auto-generate-pac.yml @@ -27,10 +27,12 @@ jobs: - name: Commit and push changes run: | + last_commit_message=$(git log -1 --pretty=%B) + $GITHUB_EVENT_NAME == 'schedule' && commit_message="定期更新数据并生成 gfw.pac" || commit_message="自动生成 gfw.pac: $last_commit_message" git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add -A - git commit -a -m "自动生成 gfw.pac" + git commit -a -m "${commit_message}" git push - name: Trigger Auto-Release