check fixed issues references (nightly) #711
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check fixed issues references (nightly) | |
on: | |
schedule: | |
- cron: '30 4 * * *' | |
workflow_dispatch: {} | |
permissions: | |
contents: read | |
jobs: | |
check_issues_state: | |
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }} | |
runs-on: ubuntu-latest | |
permissions: | |
issues: read | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1 | |
with: | |
egress-policy: audit | |
- name: checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: check issues | |
run: ./hack/check_fixed_issues_references.sh | |
notify-on-slack: | |
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }} | |
runs-on: ubuntu-latest | |
needs: | |
- check_issues_state | |
if: always() && contains(needs.*.result, 'failure') && github.event_name == 'schedule' | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1 | |
with: | |
egress-policy: audit | |
- name: Notify on Slack for failures of checking issues state run automatically at night | |
uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
with: | |
# Since notify-on-slack is triggered on failure (if statement), we can hardcode this. | |
status: failure | |
fields: repo,message,commit,author,action,eventName,ref,workflow | |
text: ':github: Some references to fixed issues exist in the codebase.' |