Skip to content

Improvement/ptfe 2836 retry workflow action#163

Merged
rdebay-scality merged 2 commits intomainfrom
improvement/PTFE-2836-retry-workflow-action
Dec 11, 2025
Merged

Improvement/ptfe 2836 retry workflow action#163
rdebay-scality merged 2 commits intomainfrom
improvement/PTFE-2836-retry-workflow-action

Conversation

@rdebay-scality
Copy link
Copy Markdown
Contributor

@rdebay-scality rdebay-scality commented Dec 5, 2025

Overview

This action checks the last workflow run on the latest commit of a specified branch and automatically retries it if it failed. It supports configurable retry limits and retry modes (retry all jobs vs. retry only failed jobs).

Features

  • Smart Retry Logic: Only retries workflows that actually failed (failure, timed_out, or cancelled)
  • Configurable Retry Limits: Set maximum number of retry attempts to prevent infinite loops
  • Flexible Retry Modes: Choose between retrying all jobs or only failed jobs
  • Job/Step Filtering: Optionally retry only if a specific job or step failed, ignoring other failures
  • Detailed Outputs: Returns workflow status, retry count, and whether a retry was triggered
  • Commit-Specific: Checks workflow runs only on the latest commit of the target branch
  • Step Summary: Automatically generates a formatted summary in the GitHub Actions UI with workflow information and retry sta

@rdebay-scality rdebay-scality requested a review from a team as a code owner December 5, 2025 13:47
@rdebay-scality rdebay-scality force-pushed the improvement/PTFE-2836-retry-workflow-action branch 4 times, most recently from 262955a to e589cec Compare December 8, 2025 14:57
@rdebay-scality rdebay-scality requested review from a team and removed request for a team December 8, 2025 15:00
@rdebay-scality rdebay-scality self-assigned this Dec 8, 2025
@rdebay-scality rdebay-scality force-pushed the improvement/PTFE-2836-retry-workflow-action branch from dfec754 to 5f3a2ca Compare December 9, 2025 13:06
Implement new composite action to automatically retry failed workflow runs
with configurable limits and retry modes (all/failed-only).

Features:
- Python script with GitHub CLI integration for workflow management
- Configurable max retries and retry modes (all vs failed-only)
- Smart retry logic: only retries failure/timed_out/cancelled workflows
- Returns status, retry count, and retry flag as outputs
- optional filtering to only retry when specific jobs or steps fail
- automatic step summary generation in GitHub Actions UI

Filtering on specific jobs or steps:
- job-name: Only retry if specified job failed (ignores other failures)
- step-name: Only retry if specified step failed (searches all jobs)
- Both: Only retry if step failed in specific job

Add automatic step summary generation in GitHub Actions UI with:
- Workflow information (name, branch, status, run ID with link)
- Retry details (count, max retries, mode, whether retried)
- Context-specific messages with visual indicators (emojis)
- Helpful notes for each scenario (retry triggered, max reached, etc.)
@rdebay-scality rdebay-scality force-pushed the improvement/PTFE-2836-retry-workflow-action branch from 5f3a2ca to a4af28c Compare December 11, 2025 12:50
@rdebay-scality rdebay-scality merged commit 39659e9 into main Dec 11, 2025
5 of 6 checks passed
@rdebay-scality rdebay-scality deleted the improvement/PTFE-2836-retry-workflow-action branch December 11, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants