From 2880490ba35a86bf7436171540653fb69e830345 Mon Sep 17 00:00:00 2001 From: "pieter.noordhuis" Date: Wed, 4 Nov 2026 08:26:48 +0000 Subject: [PATCH] Only report bump workflow failures for scheduled runs The report-failure step ran on any failure, so a failed workflow_dispatch run (for example a mistyped version input in bump-go-toolchain, or a non-dry-run manual run of bump-vuln-deps) opened an issue claiming the scheduled workflow failed and assigned seven people. Gate the step on github.event_name == 'schedule' in both workflows; this subsumes the !inputs.dry_run check in bump-vuln-deps. Co-authored-by: Isaac --- .github/actions/report-failure/action.yml | 3 ++- .github/workflows/bump-go-toolchain.yml | 3 ++- .github/workflows/bump-vuln-deps.yml | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/actions/report-failure/action.yml b/.github/actions/report-failure/action.yml index ef63226e162..d5f9b2bb0ea 100644 --- a/.github/actions/report-failure/action.yml +++ b/.github/actions/report-failure/action.yml @@ -2,7 +2,8 @@ name: 'Report failure' description: >- Track failures of a scheduled workflow in a single open issue: open it on the first failure and comment on it for every subsequent one until someone closes - it. Run this as the last step with "if: failure()". + it. Run this as the last step with + "if: failure() && github.event_name == 'schedule'". Requires the calling job to have "permissions: issues: write". inputs: diff --git a/.github/workflows/bump-go-toolchain.yml b/.github/workflows/bump-go-toolchain.yml index 9e3c0ee8602..d91cf354790 100644 --- a/.github/workflows/bump-go-toolchain.yml +++ b/.github/workflows/bump-go-toolchain.yml @@ -130,8 +130,9 @@ jobs: git push origin "HEAD:$BRANCH" # A failed scheduled run is otherwise only visible in the Actions tab. + # Manual runs are watched by whoever started them. - name: Report failure - if: failure() + if: failure() && github.event_name == 'schedule' uses: ./.github/actions/report-failure with: label: bump-go-toolchain-failure diff --git a/.github/workflows/bump-vuln-deps.yml b/.github/workflows/bump-vuln-deps.yml index 829cf668a3e..c19d3dae28b 100644 --- a/.github/workflows/bump-vuln-deps.yml +++ b/.github/workflows/bump-vuln-deps.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: inputs: dry_run: - description: "Compute and show the bump without creating a pull request or failure issue" + description: "Compute and show the bump without creating a pull request" type: boolean default: false @@ -145,8 +145,9 @@ jobs: git push origin "HEAD:$BRANCH" # A failed scheduled run is otherwise only visible in the Actions tab. + # Manual runs are watched by whoever started them. - name: Report failure - if: failure() && !inputs.dry_run + if: failure() && github.event_name == 'schedule' uses: ./.github/actions/report-failure with: label: bump-vuln-deps-failure