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