diff --git a/.github/workflows/apt.yml b/.github/workflows/apt.yml index cc2b7faf..099aefff 100644 --- a/.github/workflows/apt.yml +++ b/.github/workflows/apt.yml @@ -248,6 +248,24 @@ jobs: - name: Run Test ${{ matrix.test }} on ${{ matrix.container-image }} run: fluent-package/apt/systemd-test/test.sh ${{ matrix.container-image }} ${{ matrix.test }} + retry_test: + runs-on: ubuntu-latest + needs: test + if: failure() && github.run_attempt == 1 + permissions: + actions: write + steps: + - name: Trigger Retry via GitHub API + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + with: + script: | + console.log(`Job failed. Attempt number: ${context.runAttempt}. Triggering automatic retry...`); + await github.rest.actions.reRunWorkflowFailedJobs({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.runId + }); + confluent_test: name: Confluent Test runs-on: ubuntu-latest diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1aa3b4f8..55be2093 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -112,3 +112,21 @@ jobs: --volume ${PWD}:C:\fluentd:ro ` mcr.microsoft.com/dotnet/framework/runtime:3.5 ` powershell -ExecutionPolicy Bypass -Command "C:\fluentd\fluent-package\msi\${{ matrix.test }}" + + retry_test: + runs-on: windows-2022 + needs: test + if: failure() && github.run_attempt == 1 + permissions: + actions: write + steps: + - name: Trigger Retry via GitHub API + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + with: + script: | + console.log(`Job failed. Attempt number: ${context.runAttempt}. Triggering automatic retry...`); + await github.rest.actions.reRunWorkflowFailedJobs({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.runId + }); diff --git a/.github/workflows/yum.yml b/.github/workflows/yum.yml index 27cb08e6..fdd15fc3 100644 --- a/.github/workflows/yum.yml +++ b/.github/workflows/yum.yml @@ -282,6 +282,24 @@ jobs: - name: Run Test ${{ matrix.test }} on ${{ matrix.test-incus-image }} run: fluent-package/yum/systemd-test/test.sh ${{ matrix.test-incus-image }} ${{ matrix.test }} + retry_v2test: + runs-on: ubuntu-latest + needs: v2test + if: failure() && github.run_attempt == 1 + permissions: + actions: write + steps: + - name: Trigger Retry via GitHub API + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + with: + script: | + console.log(`Job failed. Attempt number: ${context.runAttempt}. Triggering automatic retry...`); + await github.rest.actions.reRunWorkflowFailedJobs({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.runId + }); + confluent_test: name: Confluent Test runs-on: ubuntu-latest