diff --git a/.github/workflows/workflow-failure-issue.yml b/.github/workflows/workflow-failure-issue.yml index dad3602ef..c15465f28 100644 --- a/.github/workflows/workflow-failure-issue.yml +++ b/.github/workflows/workflow-failure-issue.yml @@ -13,6 +13,7 @@ permissions: {} jobs: workflow-failure-issue: name: Open or close workflow failure issue + if: github.repository_owner == 'open-telemetry' permissions: issues: write # needed to open, comment on, and close workflow failure issues runs-on: ubuntu-latest diff --git a/workflow-failure-issue/README.md b/workflow-failure-issue/README.md index 31ce4675b..ba6232347 100644 --- a/workflow-failure-issue/README.md +++ b/workflow-failure-issue/README.md @@ -2,7 +2,9 @@ Reusable GitHub Actions workflow that tracks the pass/fail state of another workflow (typically a scheduled one) by opening, commenting on, and closing a -GitHub issue in the calling repository. +GitHub issue in the calling repository. The workflow runs only when the calling +repository belongs to the `open-telemetry` organization, preventing runs in +forks from creating failure issues. This is useful because GitHub notifies only a single user of scheduled-workflow failures. Per the [GitHub docs on scheduled workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#actor-for-scheduled-workflows):