This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 63b9fbf75d [ISSUE #8544] Restore retry mechanism in unit test pipeline
63b9fbf75d is described below

commit 63b9fbf75d8af04374a91688f2eed1bda157a2db
Author: 小陈 <[email protected]>
AuthorDate: Mon Aug 26 17:44:09 2024 +0800

    [ISSUE #8544] Restore retry mechanism in unit test pipeline
---
 .github/workflows/maven.yaml | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml
index a49201b8a1..7d74c832be 100644
--- a/.github/workflows/maven.yaml
+++ b/.github/workflows/maven.yaml
@@ -53,4 +53,14 @@ jobs:
         with:
           name: jvm-crash-logs
           path: /Users/runner/work/rocketmq/rocketmq/broker/hs_err_pid*.log
-          retention-days: 1
\ No newline at end of file
+          retention-days: 1
+
+      - name: Retry if failed
+        # if it failed , retry 2 times at most
+        if: failure() && fromJSON(github.run_attempt) < 3
+        env:
+          GH_REPO: ${{ github.repository }}
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          echo "Attempting to retry workflow..."
+          gh workflow run rerun-workflow.yml -F run_id=${{ github.run_id }}
\ No newline at end of file

Reply via email to