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 }}."