Skip to content

make worse

make worse #7

name: notify-if-failure.yaml
on:
pull_request:
branches:
- main
permissions:
contents: read
pull-requests: write
jobs:
notify:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: "Wait for all required checks to pass"
run: "gh pr checks --required --watch --interval 10 --fail-fast ${{ github.event.pull_request.number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Post comment if failure"
if: ${{ failure() }}
uses: "actions/github-script@v7"
with:
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Failure!`
})