From 18c1f78b479e4dfb04e2a1641336f5a44c691bdd Mon Sep 17 00:00:00 2001 From: Aleksandr Kurlov Date: Wed, 4 Feb 2026 19:32:25 +0100 Subject: [PATCH] Add disabling label for the konflux retests --- .github/workflows/README.md | 1 + .github/workflows/retest-konflux-builds.yml | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 25b4598..077e207 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -78,6 +78,7 @@ When a Konflux build check fails on a pull request, this action will automatical - **Configurable Retry Limit**: Set maximum retry attempts to prevent infinite loops - **Auto-Cleanup**: Removes old `/retest` comments when new commits are pushed - **Filtered Checks**: Only retests checks matching a specific name suffix (e.g., `-on-push`) +- **Disable via Label**: Add the `disable-konflux-auto-retest` label to a PR to skip automatic retesting ### Usage diff --git a/.github/workflows/retest-konflux-builds.yml b/.github/workflows/retest-konflux-builds.yml index 8bbb70d..0f58979 100644 --- a/.github/workflows/retest-konflux-builds.yml +++ b/.github/workflows/retest-konflux-builds.yml @@ -20,7 +20,9 @@ on: jobs: cleanup-retest-comments: - if: github.event_name == 'pull_request' + if: | + github.event_name == 'pull_request' && + !contains(github.event.pull_request.labels.*.name, 'disable-konflux-auto-retest') runs-on: ubuntu-latest permissions: @@ -58,7 +60,8 @@ jobs: github.event_name == 'check_run' && github.event.check_run.pull_requests[0] != null && github.event.check_run.conclusion == 'failure' && - startsWith(github.event.check_run.name, 'Red Hat Konflux') + startsWith(github.event.check_run.name, 'Red Hat Konflux') && + !contains(github.event.check_run.pull_requests[0].labels.*.name, 'disable-konflux-auto-retest') runs-on: ubuntu-latest permissions: