name: skip_check
on:
  issue_comment:
    types: [created, edited]
permissions:
  contents: read

jobs:
  comment_bot:
    if: startsWith(github.event.comment.body, '@bazel-io skip_check ')
    runs-on: ubuntu-latest
    permissions:
      issues: write
    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
        with:
          egress-policy: audit

      - name: Run bot
        uses: bazelbuild/continuous-integration/actions/bcr-pr-reviewer@b1056241859cba5c27844c2d7e8d39e61d6715f3 # master
        with:
          token: ${{ secrets.BCR_PR_REVIEW_HELPER_TOKEN }}
          action-type: skip_check
