From f0b837390a98554ed277ce4eb5200b1f07cf78c7 Mon Sep 17 00:00:00 2001 From: xiehaijun Date: Sat, 26 Jul 2025 15:50:34 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/demo.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 测试中途退出 --- .gitea/workflows/demo.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 9008fcc..d168d81 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -37,6 +37,16 @@ jobs: echo "作者提交时间: $commit_date" commit_durl=$(git log -1 --pretty=format:"%cr") echo "提交时长: $commit_durl" + commit_hash=$(git log -1 --pretty=format:"%H") + echo "提交Hash: $commit_hash" + if [[ "$commit_body" =~ "发布生产" ]]; then + echo '包含: if echo "$string1" | grep -q "$string2"; then' + exit 0 + else + echo "不包含" + exit 1 + fi + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."