diff --git a/.github/workflows/daily-grammar-check.yml b/.github/workflows/daily-grammar-check.yml index 8b90c2e53b..88b44eeb87 100644 --- a/.github/workflows/daily-grammar-check.yml +++ b/.github/workflows/daily-grammar-check.yml @@ -7,7 +7,7 @@ on: jobs: grammar-check: - if: github.repository == 'rust-lang/reference' + if: github.repository == 'rust-lang/reference' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - name: Checkout reference repository @@ -44,7 +44,7 @@ jobs: cargo run --release -p grammar-check -- lex-compare --tool rustc_parse - name: Check for existing open issues - if: steps.grammar-check.outcome == 'failure' + if: github.repository == 'rust-lang/reference' && steps.grammar-check.outcome == 'failure' id: check-issues env: GH_TOKEN: ${{ github.token }} @@ -54,7 +54,7 @@ jobs: echo "open_issues=$ISSUE_COUNT" >> $GITHUB_OUTPUT - name: Create issue on failure - if: steps.grammar-check.outcome == 'failure' && steps.check-issues.outputs.open_issues == '0' + if: github.repository == 'rust-lang/reference' && steps.grammar-check.outcome == 'failure' && steps.check-issues.outputs.open_issues == '0' env: GH_TOKEN: ${{ github.token }} run: |